Class KeyedPCollectionTuple<K>
java.lang.Object
org.apache.beam.sdk.transforms.join.KeyedPCollectionTuple<K>
- Type Parameters:
K- the type of key shared by all constituent PCollections
- All Implemented Interfaces:
PInput
An immutable tuple of keyed
PCollections with key type K. (PCollections containing values of type KV<K, ?>)-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA utility class to help ensure coherence of tag and input PCollection types. -
Method Summary
Modifier and TypeMethodDescription<V> KeyedPCollectionTuple<K> and(String tag, PCollection<KV<K, V>> pc) A version ofand(String, PCollection)that takes in a string instead of a TupleTag.<V> KeyedPCollectionTuple<K> and(TupleTag<V> tag, PCollection<KV<K, V>> pc) Returns a newKeyedPCollectionTuple<K>that is the same as this, appended with the given PCollection.<OutputT extends POutput>
OutputTapply(String name, PTransform<KeyedPCollectionTuple<K>, OutputT> transform) <OutputT extends POutput>
OutputTapply(PTransform<KeyedPCollectionTuple<K>, OutputT> transform) Likeapply(String, PTransform)but defaulting to the name provided by thePTransform.static <K> KeyedPCollectionTuple<K> Returns an emptyKeyedPCollectionTuple<K>on the given pipeline.expand()Expands the componentPCollections, stripping off any tag-specific information.Returns theCoGbkResultSchemaassociated with thisKeyedPCollectionTuple.Returns a list ofTaggedKeyedPCollectionsfor thePCollectionscontained in thisKeyedPCollectionTuple.booleanisEmpty()static <K,InputT>
KeyedPCollectionTuple<K> of(String tag, PCollection<KV<K, InputT>> pc) A version ofof(TupleTag, PCollection)that takes in a string instead of a TupleTag.static <K,InputT>
KeyedPCollectionTuple<K> of(TupleTag<InputT> tag, PCollection<KV<K, InputT>> pc) Returns a newKeyedPCollectionTuple<K>with the given tag and initial PCollection.
-
Method Details
-
empty
Returns an emptyKeyedPCollectionTuple<K>on the given pipeline. -
of
public static <K,InputT> KeyedPCollectionTuple<K> of(TupleTag<InputT> tag, PCollection<KV<K, InputT>> pc) Returns a newKeyedPCollectionTuple<K>with the given tag and initial PCollection. -
of
A version ofof(TupleTag, PCollection)that takes in a string instead of a TupleTag.This method is simpler for cases when a typed tuple-tag is not needed to extract a PCollection, for example when using schema transforms.
-
and
Returns a newKeyedPCollectionTuple<K>that is the same as this, appended with the given PCollection. -
and
A version ofand(String, PCollection)that takes in a string instead of a TupleTag.This method is simpler for cases when a typed tuple-tag is not needed to extract a PCollection, for example when using schema transforms.
-
isEmpty
public boolean isEmpty() -
getKeyedCollections
Returns a list ofTaggedKeyedPCollectionsfor thePCollectionscontained in thisKeyedPCollectionTuple. -
apply
public <OutputT extends POutput> OutputT apply(PTransform<KeyedPCollectionTuple<K>, OutputT> transform) Likeapply(String, PTransform)but defaulting to the name provided by thePTransform. -
apply
public <OutputT extends POutput> OutputT apply(String name, PTransform<KeyedPCollectionTuple<K>, OutputT> transform) Applies the givenPTransformto this inputKeyedPCollectionTupleand returns itsOutputT. This usesnameto identify the specific application of the transform. This name is used in various places, including the monitoring UI, logging, and to stably identify this application node in the job graph. -
expand
Expands the componentPCollections, stripping off any tag-specific information. -
getKeyCoder
-
getCoGbkResultSchema
Returns theCoGbkResultSchemaassociated with thisKeyedPCollectionTuple. -
getPipeline
Description copied from interface:PInput- Specified by:
getPipelinein interfacePInput
-