PubsubIO.Read.Bound.PubsubReader (Google Cloud Dataflow SDK 1.9.1 API)

Google Cloud Dataflow SDK for Java, version 1.9.1

Class PubsubIO.Read.Bound.PubsubReader

  • All Implemented Interfaces:
    HasDisplayData, Serializable
    Enclosing class:

    public class PubsubIO.Read.Bound.PubsubReader
    extends DoFn<Void,T>
    Default reader when Pubsub subscription has some form of upper bound.

    TODO: Consider replacing with BoundedReadFromUnboundedSource on top of PubsubUnboundedSource.

    NOTE: This is not the implementation used when running on the Google Cloud Dataflow service in streaming mode.

    Public so can be suppressed by runners.

    See Also:
    Serialized Form
    • Constructor Detail

      • PubsubReader

        public PubsubReader()
    • Method Detail

      • processElement

        public void processElement(DoFn.ProcessContext c)
                            throws IOException
        Description copied from class: DoFn
        Processes one input element.

        The current element of the input PCollection is returned by c.element(). It should be considered immutable. The Dataflow runtime will not mutate the element, so it is safe to cache, etc. The element should not be mutated by any of the DoFn methods, because it may be cached elsewhere, retained by the Dataflow runtime, or used in other unspecified ways.

        A value is added to the main output PCollection by DoFn.Context.output(OutputT). Once passed to output the element should be considered immutable and not be modified in any way. It may be cached elsewhere, retained by the Dataflow runtime, or used in other unspecified ways.

        Specified by:
        processElement in class DoFn<Void,T>
        See Also:
      • populateDisplayData

        public void populateDisplayData(DisplayData.Builder builder)
        Description copied from class: DoFn
        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
        populateDisplayData in class DoFn<Void,T>
        builder - The builder to populate with display data.
        See Also:

Send feedback about...

Cloud Dataflow