Package org.apache.beam.sdk.values
Class PValueBase
java.lang.Object
org.apache.beam.sdk.values.PValueBase
- Direct Known Subclasses:
PCollection
,PCollectionViews.SimplePCollectionView
For internal use. No backwards compatibility guarantees.
An abstract base class that provides default implementations for some methods of PValue
.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
No-arg constructor to allow subclasses to implementSerializable
.protected
PValueBase
(Pipeline pipeline) -
Method Summary
Modifier and TypeMethodDescriptionvoid
finishSpecifying
(PInput input, PTransform<?, ?> transform) After building, finalizes thisPValue
to make it ready for being used as an input to aPTransform
.void
finishSpecifyingOutput
(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 String
Returns aString
capturing the kind of thisPValueBase
.getName()
Returns the name of thisPValueBase
.Sets the name of thisPValueBase
.toString()
-
Constructor Details
-
PValueBase
-
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 Details
-
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)
.- Specified by:
getName
in interfacePValue
- Throws:
IllegalStateException
- if the name hasn't been set yet
-
setName
Sets the name of thisPValueBase
. Returnsthis
.- Throws:
IllegalStateException
- if thisPValueBase
has already been finalized and may no longer be set.
-
finishSpecifying
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
-
getKindString
Returns aString
capturing the kind of thisPValueBase
.By default, uses the base name of the current class as its kind string.
-
getPipeline
Description copied from interface:POutput
- Specified by:
getPipeline
in interfacePInput
- Specified by:
getPipeline
in interfacePOutput
-
finishSpecifyingOutput
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
-