Class GSTxtFileReaderPipe

  • All Implemented Interfaces:
    Closeable, AutoCloseable, org.pipecraft.pipes.BasePipe, org.pipecraft.pipes.sync.Pipe<String>

    public class GSTxtFileReaderPipe
    extends org.pipecraft.pipes.sync.source.StorageTxtFileReaderPipe
    A source pipe providing the lines of a text file in some Storage, in a streaming manner. Supports decompression. Note that for larger files GSTxtFileFetcherReaderPipe may be much faster.
    Author:
    Eyal Schneider
    • Constructor Detail

      • GSTxtFileReaderPipe

        public GSTxtFileReaderPipe​(GoogleStorage gs,
                                   String bucket,
                                   String path,
                                   Charset charset,
                                   int chunkSize,
                                   org.pipecraft.infra.io.FileReadOptions options)
        Constructor
        Parameters:
        gs - The storage connector
        bucket - The bucket to read the file from
        path - The full path of the text file inside the bucket
        charset - The charset used
        chunkSize - The size (in bytes) of each chunk read from storage at once, or 0 for using the default one.
        options - The file read options
      • GSTxtFileReaderPipe

        public GSTxtFileReaderPipe​(GoogleStorage gs,
                                   String bucket,
                                   String path,
                                   Charset charset)
        Constructor Uses the default read chunk size and default read options
        Parameters:
        gs - The storage connector
        bucket - The bucket to read the file from
        path - The full path of the text file inside the bucket
        charset - The charset used
      • GSTxtFileReaderPipe

        public GSTxtFileReaderPipe​(GoogleStorage gs,
                                   String bucket,
                                   String path,
                                   org.pipecraft.infra.io.FileReadOptions options)
        Constructor Uses the default read chunk size and assumes UTF8
        Parameters:
        gs - The storage connector
        bucket - The bucket to read the file from
        path - The full path of the text file inside the bucket. The file is assumed to be UTF8.
        options - The file read options
      • GSTxtFileReaderPipe

        public GSTxtFileReaderPipe​(GoogleStorage gs,
                                   String bucket,
                                   String path)
        Constructor Uses the default read chunk size and default read options, and assumes UTF8
        Parameters:
        gs - The storage connector
        bucket - The bucket to read the file from
        path - The full path of the text file inside the bucket. The file is assumed to be UTF8.