Google Cloud Dataflow SDK for Java, version 1.9.1
com.google.cloud.dataflow.sdk.transforms.join
Class KeyedPCollectionTuple<K>
- java.lang.Object
-
- com.google.cloud.dataflow.sdk.transforms.join.KeyedPCollectionTuple<K>
-
- Type Parameters:
K
- the type of key shared by all constituent PCollections
- All Implemented Interfaces:
- PInput
public class KeyedPCollectionTuple<K> extends Object implements PInput
An immutable tuple of keyedPCollections
with key type K. (PCollections
containing values of typeKV<K, ?>
)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
KeyedPCollectionTuple.TaggedKeyedPCollection<K,V>
A utility class to help ensure coherence of tag and input PCollection types.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description <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(PTransform<KeyedPCollectionTuple<K>,OutputT> transform)
Likeapply(String, PTransform)
but defaulting to the name provided by thePTransform
.<OutputT extends POutput>
OutputTapply(String name, PTransform<KeyedPCollectionTuple<K>,OutputT> transform)
static <K> KeyedPCollectionTuple<K>
empty(Pipeline pipeline)
Returns an emptyKeyedPCollectionTuple<K>
on the given pipeline.Collection<? extends PValue>
expand()
Expands the componentPCollections
, stripping off any tag-specific information.void
finishSpecifying()
After building, finalizes thisPInput
to make it ready for being used as an input to aPTransform
.CoGbkResultSchema
getCoGbkResultSchema()
Returns theCoGbkResultSchema
associated with thisKeyedPCollectionTuple
.Coder<K>
getKeyCoder()
List<KeyedPCollectionTuple.TaggedKeyedPCollection<K,?>>
getKeyedCollections()
Returns a list ofTaggedKeyedPCollections
for thePCollections
contained in thisKeyedPCollectionTuple
.Pipeline
getPipeline()
boolean
isEmpty()
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 Detail
-
empty
public static <K> KeyedPCollectionTuple<K> empty(Pipeline pipeline)
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.
-
and
public <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.
-
isEmpty
public boolean isEmpty()
-
getKeyedCollections
public List<KeyedPCollectionTuple.TaggedKeyedPCollection<K,?>> getKeyedCollections()
Returns a list ofTaggedKeyedPCollections
for thePCollections
contained 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 givenPTransform
to this inputKeyedPCollectionTuple
and returns itsOutputT
. This usesname
to 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
public Collection<? extends PValue> expand()
Expands the componentPCollections
, stripping off any tag-specific information.
-
getCoGbkResultSchema
public CoGbkResultSchema getCoGbkResultSchema()
Returns theCoGbkResultSchema
associated with thisKeyedPCollectionTuple
.
-
getPipeline
public Pipeline getPipeline()
Description copied from interface:PInput
- Specified by:
getPipeline
in interfacePInput
-
finishSpecifying
public void finishSpecifying()
Description copied from interface:PInput
After building, finalizes thisPInput
to make it ready for being used as an input to aPTransform
.Automatically invoked whenever
apply()
is invoked on thisPInput
, so users do not normally call this explicitly.- Specified by:
finishSpecifying
in interfacePInput
-
-