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
ConstructorsModifierConstructorDescriptionprotectedNo-arg constructor to allow subclasses to implementSerializable.protectedPValueBase(Pipeline pipeline) -
Method Summary
Modifier and TypeMethodDescriptionvoidfinishSpecifying(PInput input, PTransform<?, ?> transform) After building, finalizes thisPValueto make it ready for being used as an input to aPTransform.voidfinishSpecifyingOutput(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 StringReturns aStringcapturing 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 resultingPValueBaseis 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
PValueBaseis based on the name of thePTransformthat produces it. It can be specified explicitly by callingsetName(java.lang.String).- Specified by:
getNamein interfacePValue- Throws:
IllegalStateException- if the name hasn't been set yet
-
setName
Sets the name of thisPValueBase. Returnsthis.- Throws:
IllegalStateException- if thisPValueBasehas already been finalized and may no longer be set.
-
finishSpecifying
Description copied from interface:PValueAfter building, finalizes thisPValueto 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:
finishSpecifyingin interfacePValue- Parameters:
input- thePInputthePTransformwas applied to to produce this outputtransform- thePTransformthat produced thisPValue
-
toString
-
getKindString
Returns aStringcapturing 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:
getPipelinein interfacePInput- Specified by:
getPipelinein interfacePOutput
-
finishSpecifyingOutput
Description copied from interface:POutputAs 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
PCollectionshaveCodersspecified or defaulted.Automatically invoked whenever this
POutputis output, afterPOutput.finishSpecifyingOutput(String, PInput, PTransform)has been called on each componentPValuereturned byPOutput.expand().- Specified by:
finishSpecifyingOutputin interfacePOutput
-