Class GSTxtFileWriterPipe

  • All Implemented Interfaces:
    Closeable, AutoCloseable, org.pipecraft.pipes.BasePipe

    public class GSTxtFileWriterPipe
    extends org.pipecraft.pipes.terminal.StorageTxtFileWriterPipe
    A terminal pipe writing text lines from the input pipe into a remote GoogleStorage file. Supports compression.
    Author:
    Eyal Schneider
    See Also:
    GSTxtFileReaderPipe
    • Constructor Detail

      • GSTxtFileWriterPipe

        public GSTxtFileWriterPipe​(org.pipecraft.pipes.sync.Pipe<String> input,
                                   GoogleStorage gs,
                                   String bucket,
                                   String path,
                                   Charset charset,
                                   int chunkSize,
                                   org.pipecraft.infra.io.FileWriteOptions options)
        Constructor
        Parameters:
        input - The input pipe
        gs - The google storage connector
        bucket - The bucket to write to
        path - The full path (excluding the bucket) of the target file
        chunkSize - The size (in bytes) of each chunk written to GS at once, or 0 for using the default one.
        charset - The charset to use
        options - The file writing options. Note that append and temp aren't supported by GS, so these flag are ignored.
      • GSTxtFileWriterPipe

        public GSTxtFileWriterPipe​(org.pipecraft.pipes.sync.Pipe<String> input,
                                   GoogleStorage gs,
                                   String bucket,
                                   String path,
                                   Charset charset)
        Constructor Uses the default write options and chunk size
        Parameters:
        input - The input pipe
        gs - The google storage connector
        bucket - The bucket to write to
        path - The full path (excluding the bucket) of the target file
        charset - The charset to use
      • GSTxtFileWriterPipe

        public GSTxtFileWriterPipe​(org.pipecraft.pipes.sync.Pipe<String> input,
                                   GoogleStorage gs,
                                   String bucket,
                                   String path,
                                   org.pipecraft.infra.io.FileWriteOptions options)
        Constructor Uses default chunk size and UTF8
        Parameters:
        input - The input pipe
        gs - The google storage connector
        bucket - The bucket to write to
        path - The full path (excluding the bucket) of the target file
        options - The file writing options. Note that append isn't supported by GS, so this flag is ignored.
      • GSTxtFileWriterPipe

        public GSTxtFileWriterPipe​(org.pipecraft.pipes.sync.Pipe<String> input,
                                   GoogleStorage gs,
                                   String bucket,
                                   String path)
        Constructor Uses default write options and chunk size, and assumes UTF8
        Parameters:
        input - The input pipe
        gs - The google storage connector
        bucket - The bucket to write to
        path - The full path (excluding the bucket) of the target file