Class DataflowGroupByKey<K,V>
- java.lang.Object
-
- org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<K,V>>,org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<K,java.lang.Iterable<V>>>>
-
- org.apache.beam.runners.dataflow.internal.DataflowGroupByKey<K,V>
-
- All Implemented Interfaces:
java.io.Serializable,org.apache.beam.sdk.transforms.display.HasDisplayData
public class DataflowGroupByKey<K,V> extends org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<K,V>>,org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<K,java.lang.Iterable<V>>>>Specialized implementation ofGroupByKeyfor translating Redistribute transform into Dataflow service protos.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDataflowGroupByKey.RegistrarRegistersDataflowGroupByKey.DataflowGroupByKeyTranslator.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanallowDuplicates()Returns whether it allows duplicated elements in the output.static voidapplicableTo(org.apache.beam.sdk.values.PCollection<?> input)static <K,V>
DataflowGroupByKey<K,V>create()Returns aDataflowGroupByKey<K, V>PTransform.static <K,V>
DataflowGroupByKey<K,V>createWithAllowDuplicates()Returns aDataflowGroupByKey<K, V>PTransformthat its output can have duplicated elements.org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<K,java.lang.Iterable<V>>>expand(org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<K,V>> input)static <K,V>
org.apache.beam.sdk.coders.Coder<V>getInputValueCoder(org.apache.beam.sdk.coders.Coder<org.apache.beam.sdk.values.KV<K,V>> inputCoder)Returns theCoderof the values of the input to this transform.static <K,V>
org.apache.beam.sdk.coders.KvCoder<K,java.lang.Iterable<V>>getOutputKvCoder(org.apache.beam.sdk.coders.Coder<org.apache.beam.sdk.values.KV<K,V>> inputCoder)Returns theCoderof the output of this transform.org.apache.beam.sdk.values.WindowingStrategy<?,?>updateWindowingStrategy(org.apache.beam.sdk.values.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 Detail
-
create
public static <K,V> DataflowGroupByKey<K,V> 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
public static <K,V> DataflowGroupByKey<K,V> 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.
-
applicableTo
public static void applicableTo(org.apache.beam.sdk.values.PCollection<?> input)
-
updateWindowingStrategy
public org.apache.beam.sdk.values.WindowingStrategy<?,?> updateWindowingStrategy(org.apache.beam.sdk.values.WindowingStrategy<?,?> inputStrategy)
-
expand
public org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<K,java.lang.Iterable<V>>> expand(org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<K,V>> input)
-
getInputValueCoder
public static <K,V> org.apache.beam.sdk.coders.Coder<V> getInputValueCoder(org.apache.beam.sdk.coders.Coder<org.apache.beam.sdk.values.KV<K,V>> inputCoder)
Returns theCoderof the values of the input to this transform.
-
getOutputKvCoder
public static <K,V> org.apache.beam.sdk.coders.KvCoder<K,java.lang.Iterable<V>> getOutputKvCoder(org.apache.beam.sdk.coders.Coder<org.apache.beam.sdk.values.KV<K,V>> inputCoder)
Returns theCoderof the output of this transform.
-
-