FileBasedSink.FileBasedWriter (Google Cloud Dataflow SDK 1.9.1 API)

Google Cloud Dataflow SDK for Java, version 1.9.1

com.google.cloud.dataflow.sdk.io

Class FileBasedSink.FileBasedWriter<T>

  • Type Parameters:
    T - the type of values to write.
    Direct Known Subclasses:
    XmlSink.XmlWriter
    Enclosing class:
    FileBasedSink<T>


    public abstract static class FileBasedSink.FileBasedWriter<T>
    extends Sink.Writer<T,FileBasedSink.FileResult>
    Abstract Sink.Writer that writes a bundle to a FileBasedSink. Subclass implementations provide a method that can write a single value to a WritableByteChannel (Sink.Writer.write(T)).

    Subclass implementations may also override methods that write headers and footers before and after the values in a bundle, respectively, as well as provide a MIME type for the output channel.

    Multiple FileBasedWriter instances may be created on the same worker, and therefore any access to static members or methods should be thread safe.

    • Field Detail

      • mimeType

        protected String mimeType
        The MIME type used in the creation of the output channel (if the file system supports it).

        GCS, for example, supports writing files with Content-Type metadata.

        May be overridden. Default is MimeTypes.TEXT. See MimeTypes for other options.


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

Send feedback about...

Cloud Dataflow
Need help? Visit our support page.