Package org.apache.beam.sdk.values
Class PValueBase
- java.lang.Object
-
- org.apache.beam.sdk.values.PValueBase
-
- Direct Known Subclasses:
PCollection
,PCollectionViews.SimplePCollectionView
@Internal public abstract class PValueBase extends java.lang.Object implements PValue
For internal use. No backwards compatibility guarantees.An abstract base class that provides default implementations for some methods of
PValue
.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
PValueBase()
No-arg constructor to allow subclasses to implementSerializable
.protected
PValueBase(Pipeline pipeline)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
finishSpecifying(PInput input, PTransform<?,?> transform)
After building, finalizes thisPValue
to make it ready for being used as an input to aPTransform
.void
finishSpecifyingOutput(java.lang.String transformName, PInput input, PTransform<?,?> transform)
As part of applying the producingPTransform
, finalizes this output to make it ready for being used as an input and for running.protected java.lang.String
getKindString()
Returns aString
capturing the kind of thisPValueBase
.java.lang.String
getName()
Returns the name of thisPValueBase
.Pipeline
getPipeline()
PValueBase
setName(java.lang.String name)
Sets the name of thisPValueBase
.java.lang.String
toString()
-
-
-
Constructor Detail
-
PValueBase
protected PValueBase(Pipeline pipeline)
-
PValueBase
protected PValueBase()
No-arg constructor to allow subclasses to implementSerializable
. The resultingPValueBase
is not valid as aPValue
, but may have other properties that are still usable, such as the tag in aPCollectionView
.
-
-
Method Detail
-
getName
public java.lang.String getName()
Returns the name of thisPValueBase
.By default, the name of a
PValueBase
is based on the name of thePTransform
that produces it. It can be specified explicitly by callingsetName(java.lang.String)
.
-
setName
public PValueBase setName(java.lang.String name)
Sets the name of thisPValueBase
. Returnsthis
.- Throws:
java.lang.IllegalStateException
- if thisPValueBase
has already been finalized and may no longer be set.
-
finishSpecifying
public void finishSpecifying(PInput input, PTransform<?,?> transform)
Description copied from interface:PValue
After building, finalizes thisPValue
to make it ready for being used as an input to aPTransform
.Automatically invoked whenever
apply()
is invoked on thisPValue
. Users should not normally call this explicitly.- Specified by:
finishSpecifying
in interfacePValue
- Parameters:
input
- thePInput
thePTransform
was applied to to produce this outputtransform
- thePTransform
that produced thisPValue
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getKindString
protected java.lang.String getKindString()
Returns aString
capturing the kind of thisPValueBase
.By default, uses the base name of the current class as its kind string.
-
getPipeline
public Pipeline getPipeline()
Description copied from interface:POutput
- Specified by:
getPipeline
in interfacePInput
- Specified by:
getPipeline
in interfacePOutput
-
finishSpecifyingOutput
public void finishSpecifyingOutput(java.lang.String transformName, PInput input, PTransform<?,?> transform)
Description copied from interface:POutput
As part of applying the producingPTransform
, finalizes this output to make it ready for being used as an input and for running.This includes ensuring that all
PCollections
haveCoders
specified or defaulted.Automatically invoked whenever this
POutput
is output, afterPOutput.finishSpecifyingOutput(String, PInput, PTransform)
has been called on each componentPValue
returned byPOutput.expand()
.- Specified by:
finishSpecifyingOutput
in interfacePOutput
-
-