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 classRegistersDataflowGroupByKey.DataflowGroupByKeyTranslator. -
Field Summary
Fields inherited from class org.apache.beam.sdk.transforms.PTransform
annotations, displayData, name, resourceHints -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether it allows duplicated elements in the output.static voidapplicableTo(PCollection<?> input) static <K,V> DataflowGroupByKey <K, V> create()Returns aDataflowGroupByKey<K, V>PTransform.static <K,V> DataflowGroupByKey <K, V> Returns aDataflowGroupByKey<K, V>PTransformthat its output can have duplicated elements.PCollection<KV<K, Iterable<V>>> expand(PCollection<KV<K, V>> input) Override this method to specify how thisPTransformshould be expanded on the givenInputT.static <K,V> Coder <V> getInputValueCoder(Coder<KV<K, V>> inputCoder) Returns theCoderof the values of the input to this transform.getOutputKvCoder(Coder<KV<K, V>> inputCoder) Returns theCoderof the output of this transform.voidFor Beam internal use only.booleanFor Beam internal use only.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 outputPCollectionsV- the type of the values of the inputPCollectionand the elements of theIterables in the outputPCollection
-
createWithAllowDuplicates
Returns aDataflowGroupByKey<K, V>PTransformthat its output can have duplicated elements.- Type Parameters:
K- the type of the keys of the input and outputPCollectionsV- the type of the values of the inputPCollectionand the elements of theIterables in the outputPCollection
-
allowDuplicates
public boolean allowDuplicates()Returns whether it allows duplicated elements in the output. -
setInsideGBEK
public void setInsideGBEK()For Beam internal use only. Tells runner that this is an inner GBK inside of a GroupByEncryptedKey -
surroundsGBEK
public boolean surroundsGBEK()For Beam internal use only. Tells runner that this is a GBK wrapped around of a GroupByEncryptedKey -
applicableTo
-
updateWindowingStrategy
-
expand
Description copied from class:PTransformOverride this method to specify how thisPTransformshould be expanded on the givenInputT.NOTE: This method should not be called directly. Instead apply the
PTransformshould be applied to theInputTusing theapplymethod.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:
expandin classPTransform<PCollection<KV<K,V>>, PCollection<KV<K, Iterable<V>>>>
-
getInputValueCoder
Returns theCoderof the values of the input to this transform. -
getOutputKvCoder
Returns theCoderof the output of this transform.
-