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()
|
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 may no longer be set.public void recordAsOutput(AppliedPTransform<?,?,?> transform)
POutputValueBasePOutputValueBase is an output with the
given name of the given AppliedPTransform.
To be invoked only by POutput.recordAsOutput(org.apache.beam.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(org.apache.beam.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.
PValue expands to itself.PValues (such as
PCollectionTuple or PCollectionList)
expands to its component PValue 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 PInputprotected String getKindString()
String capturing the kind of this
PValueBase.
By default, uses the base name of the current class as its kind string.