K
- the type of key shared by all constituent PCollectionspublic class KeyedPCollectionTuple<K> extends java.lang.Object implements PInput
PCollections
with key type K. (PCollections
containing values of type KV<K, ?>
)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.
|
Modifier and Type | Method and Description |
---|---|
<V> KeyedPCollectionTuple<K> |
and(java.lang.String tag,
PCollection<KV<K,V>> pc)
A version of
and(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 new
KeyedPCollectionTuple<K> that is the same as this, appended with the
given PCollection. |
<OutputT extends POutput> |
apply(PTransform<KeyedPCollectionTuple<K>,OutputT> transform)
Like
apply(String, PTransform) but defaulting to the name provided by the PTransform . |
<OutputT extends POutput> |
apply(java.lang.String name,
PTransform<KeyedPCollectionTuple<K>,OutputT> transform)
|
static <K> KeyedPCollectionTuple<K> |
empty(Pipeline pipeline)
Returns an empty
KeyedPCollectionTuple<K> on the given pipeline. |
java.util.Map<TupleTag<?>,PValue> |
expand()
Expands the component
PCollections , stripping off any tag-specific
information. |
CoGbkResultSchema |
getCoGbkResultSchema()
Returns the
CoGbkResultSchema associated with this KeyedPCollectionTuple . |
Coder<K> |
getKeyCoder()
|
java.util.List<KeyedPCollectionTuple.TaggedKeyedPCollection<K,?>> |
getKeyedCollections()
Returns a list of
TaggedKeyedPCollections for the PCollections contained in this KeyedPCollectionTuple . |
Pipeline |
getPipeline()
|
boolean |
isEmpty() |
static <K,InputT> KeyedPCollectionTuple<K> |
of(java.lang.String tag,
PCollection<KV<K,InputT>> pc)
A version of
of(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 new
KeyedPCollectionTuple<K> with the given tag and initial PCollection. |
public static <K> KeyedPCollectionTuple<K> empty(Pipeline pipeline)
KeyedPCollectionTuple<K>
on the given pipeline.public static <K,InputT> KeyedPCollectionTuple<K> of(TupleTag<InputT> tag, PCollection<KV<K,InputT>> pc)
KeyedPCollectionTuple<K>
with the given tag and initial PCollection.public static <K,InputT> KeyedPCollectionTuple<K> of(java.lang.String tag, PCollection<KV<K,InputT>> pc)
of(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.
public <V> KeyedPCollectionTuple<K> and(TupleTag<V> tag, PCollection<KV<K,V>> pc)
KeyedPCollectionTuple<K>
that is the same as this, appended with the
given PCollection.public <V> KeyedPCollectionTuple<K> and(java.lang.String tag, PCollection<KV<K,V>> pc)
and(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.
public boolean isEmpty()
public java.util.List<KeyedPCollectionTuple.TaggedKeyedPCollection<K,?>> getKeyedCollections()
TaggedKeyedPCollections
for the PCollections
contained in this KeyedPCollectionTuple
.public <OutputT extends POutput> OutputT apply(PTransform<KeyedPCollectionTuple<K>,OutputT> transform)
apply(String, PTransform)
but defaulting to the name provided by the PTransform
.public <OutputT extends POutput> OutputT apply(java.lang.String name, PTransform<KeyedPCollectionTuple<K>,OutputT> transform)
PTransform
to this input KeyedPCollectionTuple
and returns
its OutputT
. This uses name
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.public java.util.Map<TupleTag<?>,PValue> expand()
PCollections
, stripping off any tag-specific
information.public CoGbkResultSchema getCoGbkResultSchema()
CoGbkResultSchema
associated with this KeyedPCollectionTuple
.public Pipeline getPipeline()
PInput
getPipeline
in interface PInput