Class DataflowGroupByKey<K,V>
java.lang.Object
org.apache.beam.sdk.transforms.PTransform<PCollection<KV<K,V>>,PCollection<KV<K,Iterable<V>>>>
org.apache.beam.runners.dataflow.internal.DataflowGroupByKey<K,V>
- All Implemented Interfaces:
Serializable
,HasDisplayData
public class DataflowGroupByKey<K,V>
extends PTransform<PCollection<KV<K,V>>,PCollection<KV<K,Iterable<V>>>>
Specialized implementation of
GroupByKey
for translating Redistribute transform into
Dataflow service protos.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
RegistersDataflowGroupByKey.DataflowGroupByKeyTranslator
. -
Field Summary
Fields inherited from class org.apache.beam.sdk.transforms.PTransform
annotations, displayData, name, resourceHints
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns whether it allows duplicated elements in the output.static void
applicableTo
(PCollection<?> input) static <K,
V> DataflowGroupByKey <K, V> create()
Returns aDataflowGroupByKey<K, V>
PTransform
.static <K,
V> DataflowGroupByKey <K, V> Returns aDataflowGroupByKey<K, V>
PTransform
that its output can have duplicated elements.PCollection
<KV<K, Iterable<V>>> expand
(PCollection<KV<K, V>> input) Override this method to specify how thisPTransform
should be expanded on the givenInputT
.static <K,
V> Coder <V> getInputValueCoder
(Coder<KV<K, V>> inputCoder) Returns theCoder
of the values of the input to this transform.getOutputKvCoder
(Coder<KV<K, V>> inputCoder) Returns theCoder
of the output of this transform.WindowingStrategy
<?, ?> updateWindowingStrategy
(WindowingStrategy<?, ?> inputStrategy) Methods inherited from class org.apache.beam.sdk.transforms.PTransform
addAnnotation, compose, compose, getAdditionalInputs, getAnnotations, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, populateDisplayData, setDisplayData, setResourceHints, toString, validate, validate
-
Method Details
-
create
Returns aDataflowGroupByKey<K, V>
PTransform
.- Type Parameters:
K
- the type of the keys of the input and outputPCollection
sV
- the type of the values of the inputPCollection
and the elements of theIterable
s in the outputPCollection
-
createWithAllowDuplicates
Returns aDataflowGroupByKey<K, V>
PTransform
that its output can have duplicated elements.- Type Parameters:
K
- the type of the keys of the input and outputPCollection
sV
- the type of the values of the inputPCollection
and the elements of theIterable
s in the outputPCollection
-
allowDuplicates
public boolean allowDuplicates()Returns whether it allows duplicated elements in the output. -
applicableTo
-
updateWindowingStrategy
-
expand
Description copied from class:PTransform
Override this method to specify how thisPTransform
should be expanded on the givenInputT
.NOTE: This method should not be called directly. Instead apply the
PTransform
should be applied to theInputT
using theapply
method.Composite transforms, which are defined in terms of other transforms, should return the output of one of the composed transforms. Non-composite transforms, which do not apply any transforms internally, should return a new unbound output and register evaluators (via backend-specific registration methods).
- Specified by:
expand
in classPTransform<PCollection<KV<K,
V>>, PCollection<KV<K, Iterable<V>>>>
-
getInputValueCoder
Returns theCoder
of the values of the input to this transform. -
getOutputKvCoder
Returns theCoder
of the output of this transform.
-