public class PBegin extends Object implements PInput
PBegin is used as the "input" to a root
PTransform that
is the first operation in a Pipeline, such as
TextIO.Read or
Create.
Typically created by calling Pipeline.begin() on a Pipeline.
| Modifier | Constructor and Description |
|---|---|
protected |
PBegin(Pipeline pipeline)
Constructs a
PBegin in the given Pipeline. |
| Modifier and Type | Method and Description |
|---|---|
<OutputT extends POutput> |
apply(PTransform<? super PBegin,OutputT> t)
Like
apply(String, PTransform) but defaulting to the name
of the PTransform. |
<OutputT extends POutput> |
apply(String name,
PTransform<? super PBegin,OutputT> t)
Applies the given
PTransform to this input PBegin,
using name to identify this specific application of the transform. |
Collection<? extends PValue> |
expand()
Expands this
PInput into a list of its component input PValues. |
void |
finishSpecifying()
After building, finalizes this
PInput to make it ready for
being used as an input to a PTransform. |
Pipeline |
getPipeline()
Returns the owning
Pipeline of this PInput. |
static PBegin |
in(Pipeline pipeline)
Returns a
PBegin in the given Pipeline. |
protected PBegin(Pipeline pipeline)
PBegin in the given Pipeline.public <OutputT extends POutput> OutputT apply(PTransform<? super PBegin,OutputT> t)
apply(String, PTransform) but defaulting to the name
of the PTransform.public <OutputT extends POutput> OutputT apply(String name, PTransform<? super PBegin,OutputT> t)
PTransform to this input PBegin,
using name to identify this 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 Pipeline getPipeline()
PInputPipeline of this PInput.getPipeline in interface PInputpublic Collection<? extends PValue> expand()
PInputPInput into a list of its component input 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 PInput