XmlSink.Bound (Google Cloud Dataflow SDK 1.9.1 API)

Google Cloud Dataflow SDK for Java, version 1.9.1


Class XmlSink.Bound<T>

    • Method Detail

      • ofRecordClass

        public <T> XmlSink.Bound<T> ofRecordClass(Class<T> classToBind)
        Returns an XmlSink that writes objects of the class specified as XML elements.

        The specified class must be able to be used to create a JAXB context.

      • toFilenamePrefix

        public XmlSink.Bound<T> toFilenamePrefix(String baseOutputFilename)
        Returns an XmlSink that writes to files with the given prefix.

        Output files will have the name {filenamePrefix}-0000i-of-0000n.xml where n is the number of output bundles that the Dataflow service divides the output into.

      • withRootElement

        public XmlSink.Bound<T> withRootElement(String rootElementName)
        Returns an XmlSink that writes XML files with an enclosing root element of the supplied name.
      • validate

        public void validate(PipelineOptions options)
        Validates that the root element, class to bind to a JAXB context, and filenamePrefix have been set and that the class can be bound in a JAXB context.
        validate in class FileBasedSink<T>
      • populateDisplayData

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

Send feedback about...

Cloud Dataflow