PTransform (Google Cloud Dataflow SDK 1.9.1 API)

Google Cloud Dataflow SDK for Java, version 1.9.1

com.google.cloud.dataflow.sdk.transforms

Class PTransform<InputT extends PInput,OutputT extends POutput>

  • java.lang.Object
    • com.google.cloud.dataflow.sdk.transforms.PTransform<InputT,OutputT>
    • Field Detail

      • name

        protected final transient String name
        The base name of this PTransform, e.g., from ParDo.named(String), or from defaults, or null if not yet assigned.
    • Constructor Detail

      • PTransform

        protected PTransform()
      • PTransform

        protected PTransform(String name)
    • Method Detail

      • apply

        public OutputT apply(InputT input)
        Applies this PTransform on the given InputT, and returns its Output.

        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).

        The default implementation throws an exception. A derived class must either implement apply, or else each runner must supply a custom implementation via PipelineRunner.apply(com.google.cloud.dataflow.sdk.transforms.PTransform<InputT, OutputT>, InputT).

      • validate

        public void validate(InputT input)
        Called before invoking apply (which may be intercepted by the runner) to verify this transform is fully specified and applicable to the specified input.

        By default, does nothing.

      • getName

        public String getName()
        Returns the transform name.

        This name is provided by the transform creator and is not required to be unique.

      • getKindString

        protected String getKindString()
        Returns the name to use by default for this PTransform (not including the names of any enclosing PTransforms).

        By default, returns the base name of this PTransform's class.

        The caller is responsible for ensuring that names of applied PTransforms are unique, e.g., by adding a uniquifying suffix when needed.

      • populateDisplayData

        public void populateDisplayData(DisplayData.Builder builder)
        Register display data for the given transform or component.

        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.

        Specified by:
        populateDisplayData in interface HasDisplayData
        Parameters:
        builder - The builder to populate with display data.
        See Also:
        HasDisplayData


Was this page helpful? Let us know how we did:

Send feedback about...

Cloud Dataflow