public abstract class PValueBase extends POutputValueBase implements PValue
PValueBase is an abstract base class that provides
sensible default implementations for methods of PValue.
In particular, this includes functionality for getting/setting:
Pipeline that the PValue is
part of.
PValue has bee finalized (as an input
or an output), after which its properties can
no longer be changed.
For internal use.
| Modifier | Constructor and Description |
|---|---|
protected |
PValueBase() |
| Modifier and Type | Method and Description |
|---|---|
java.util.Collection<? extends PValue> |
expand()
Expands this
POutput into a list of its component output
PValues. |
void |
finishSpecifying()
After building, finalizes this PInput to make it ready for
being used as an input to a PTransform.
|
protected java.lang.String |
getKindString()
Returns a
String capturing the kind of this
PValueBase. |
java.lang.String |
getName()
Returns the name of this
PValueBase. |
Pipeline |
getPipeline()
Returns the owning
Pipeline of this PValueBase. |
boolean |
isFinishedSpecifyingInternal()
Returns whether this
PValueBase has been finalized, and
its core properties, e.g., name, can no longer be changed. |
void |
recordAsOutput(Pipeline pipeline,
PTransform<?,?> transform)
Records that this
POutputValueBase is an output with the
given name of the given PTransform in the given
Pipeline. |
protected void |
recordAsOutput(Pipeline pipeline,
PTransform<?,?> transform,
java.lang.String outName)
Records that this
POutputValueBase is an output with the
given name of the given PTransform in the given
Pipeline. |
PValueBase |
setName(java.lang.String name)
Sets the name of this
PValueBase. |
PValue |
setPipelineInternal(Pipeline pipeline)
Sets the owning
Pipeline of this PValueBase. |
java.lang.String |
toString() |
finishSpecifyingOutput, getProducingTransformInternalclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetProducingTransformInternalfinishSpecifyingOutputpublic java.lang.String getName()
PValueBase.
By default, the name of a PValueBase is based on the
name of the PTransform that produces it. It can be
specified explicitly by calling setName(java.lang.String).
public PValueBase setName(java.lang.String name)
PValueBase. Returns this.java.lang.IllegalStateException - if this PValueBase has
already been finalized and is no longer settable, e.g., by having
apply() called on itpublic Pipeline getPipeline()
Pipeline of this PValueBase.getPipeline in interface PInputjava.lang.IllegalStateException - if the owning Pipeline
hasn't been set yetpublic PValue setPipelineInternal(Pipeline pipeline)
Pipeline of this PValueBase.
Returns this.
For internal use only.
setPipelineInternal in interface PValuejava.lang.IllegalArgumentException - if the owner has already been set
differentlypublic void recordAsOutput(Pipeline pipeline, PTransform<?,?> transform)
POutputValueBasePOutputValueBase is an output with the
given name of the given PTransform in the given
Pipeline.
To be invoked only by POutput.recordAsOutput(com.google.cloud.dataflow.sdk.Pipeline, com.google.cloud.dataflow.sdk.transforms.PTransform<?, ?>)
implementations. Not to be invoked directly by user code.
recordAsOutput in interface POutputrecordAsOutput in class POutputValueBaseprotected void recordAsOutput(Pipeline pipeline, PTransform<?,?> transform, java.lang.String outName)
POutputValueBase is an output with the
given name of the given PTransform in the given
Pipeline.
To be invoked only by POutput.recordAsOutput(com.google.cloud.dataflow.sdk.Pipeline, com.google.cloud.dataflow.sdk.transforms.PTransform<?, ?>)
implementations. Not to be invoked directly by user code.
public boolean isFinishedSpecifyingInternal()
PValueBase has been finalized, and
its core properties, e.g., name, can no longer be changed.
For internal use only.
public java.util.Collection<? extends PValue> expand()
POutputPOutput into a list of its component output
PValues.
A PValue expands to itself.
A tuple or list of PValues (e.g.,
PCollectionTuple, and
PCollectionList) expands to its component PValues.
Not intended to be invoked directly by user code.
public void finishSpecifying()
PInputAfter building, finalizes this PInput to make it ready for being used as an input to a PTransform.
Automatically invoked whenever apply() is invoked on
this PInput, so users do not normally call this explicitly.
finishSpecifying in interface PInputpublic java.lang.String toString()
toString in class java.lang.Objectprotected java.lang.String getKindString()
String capturing the kind of this
PValueBase.
By default, uses the base name of this PValueBase's
class as its kind string.