public abstract class ForwardingPTransform<InputT extends PInput,OutputT extends POutput> extends PTransform<InputT,OutputT>
PTransform
overrides, which behave identically to the
delegate transform but with overridden methods. Implementors are required to implement delegate()
, which returns the object to forward calls to, and expand(PInput)
.annotations, displayData, name, resourceHints
Constructor and Description |
---|
ForwardingPTransform() |
Modifier and Type | Method and Description |
---|---|
protected abstract PTransform<InputT,OutputT> |
delegate() |
OutputT |
expand(InputT input)
Override this method to specify how this
PTransform should be expanded on the given
InputT . |
java.util.Map<TupleTag<?>,PValue> |
getAdditionalInputs()
Returns all
PValues that are consumed as inputs to this PTransform that
are independent of the expansion of the InputT within PTransform.expand(PInput) . |
java.lang.String |
getName()
Returns the transform name.
|
void |
populateDisplayData(DisplayData.Builder builder)
Register display data for the given transform or component.
|
void |
validate(PipelineOptions options)
Called before running the Pipeline to verify this transform is fully and correctly specified.
|
addAnnotation, compose, compose, getAnnotations, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getResourceHints, setDisplayData, setResourceHints, toString, validate
protected abstract PTransform<InputT,OutputT> delegate()
public OutputT expand(InputT input)
PTransform
PTransform
should be expanded on the given
InputT
.
NOTE: This method should not be called directly. Instead apply the PTransform
should
be applied to the InputT
using the apply
method.
Composite transforms, which are defined in terms of other transforms, should return the output of one of the composed transforms. Non-composite transforms, which do not apply any transforms internally, should return a new unbound output and register evaluators (via backend-specific registration methods).
public java.util.Map<TupleTag<?>,PValue> getAdditionalInputs()
PTransform
PValues
that are consumed as inputs to this PTransform
that
are independent of the expansion of the InputT
within PTransform.expand(PInput)
.
For example, this can contain any side input consumed by this PTransform
.
getAdditionalInputs
in class PTransform<InputT extends PInput,OutputT extends POutput>
public void validate(PipelineOptions options)
PTransform
By default, does nothing.
public java.lang.String getName()
PTransform
This name is provided by the transform creator and is not required to be unique.
public void populateDisplayData(DisplayData.Builder builder)
PTransform
populateDisplayData(DisplayData.Builder)
is invoked by Pipeline runners to collect
display data via DisplayData.from(HasDisplayData)
. Implementations may call super.populateDisplayData(builder)
in order to register display data in the current namespace,
but should otherwise use subcomponent.populateDisplayData(builder)
to use the namespace
of the subcomponent.
By default, does not register any display data. Implementors may override this method to provide their own display data.
populateDisplayData
in interface HasDisplayData
populateDisplayData
in class PTransform<InputT extends PInput,OutputT extends POutput>
builder
- The builder to populate with display data.HasDisplayData