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()
No-arg constructor for Java serialization only.
|
protected |
PValueBase(Pipeline pipeline) |
| Modifier and Type | Method and Description |
|---|---|
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 String |
getKindString()
Returns a
String capturing the kind of this
PValueBase. |
String |
getName()
Returns the name 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(AppliedPTransform<?,?,?> transform)
Records that this
POutputValueBase is an output with the
given name of the given AppliedPTransform. |
protected void |
recordAsOutput(AppliedPTransform<?,?,?> transform,
String outName)
Records that this
POutputValueBase is an output with the
given name of the given AppliedPTransform in the given
Pipeline. |
PValueBase |
setName(String name)
Sets the name of this
PValueBase. |
String |
toString() |
finishSpecifyingOutput, getPipeline, getProducingTransformInternalclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetProducingTransformInternalfinishSpecifyingOutput, getPipelinegetPipelineprotected PValueBase(Pipeline pipeline)
protected PValueBase()
PValueBase is unlikely to be
valid.public 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).
getName in interface PValueIllegalStateException - if the name hasn't been set yetpublic PValueBase setName(String name)
PValueBase. Returns this.IllegalStateException - if this PValueBase has
already been finalized and is no longer settable, e.g., by having
apply() called on itpublic void recordAsOutput(AppliedPTransform<?,?,?> transform)
POutputValueBasePOutputValueBase is an output with the
given name of the given AppliedPTransform.
To be invoked only by POutput.recordAsOutput(com.google.cloud.dataflow.sdk.transforms.AppliedPTransform<?, ?, ?>)
implementations. Not to be invoked directly by user code.
recordAsOutput in interface POutputrecordAsOutput in class POutputValueBaseprotected void recordAsOutput(AppliedPTransform<?,?,?> transform, String outName)
POutputValueBase is an output with the
given name of the given AppliedPTransform in the given
Pipeline.
To be invoked only by POutput.recordAsOutput(com.google.cloud.dataflow.sdk.transforms.AppliedPTransform<?, ?, ?>)
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 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()
PInput After 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 PInputprotected String getKindString()
String capturing the kind of this
PValueBase.
By default, uses the base name of this PValueBase's
class as its kind string.