Class CassandraStreamWriter

  • Direct Known Subclasses:
    CassandraCompressedStreamWriter

    public class CassandraStreamWriter
    extends java.lang.Object
    CassandraStreamWriter writes given section of the SSTable to given channel.
    • Method Detail

      • write

        public void write​(StreamingDataOutputPlus out)
                   throws java.io.IOException
        Stream file of specified sections to given channel.
        Parameters:
        out - where this writes data to
        Throws:
        java.io.IOException - on any I/O error
      • totalSize

        protected long totalSize()
      • write

        protected long write​(ChannelProxy proxy,
                             DataIntegrityMetadata.ChecksumValidator validator,
                             StreamingDataOutputPlus output,
                             long start,
                             int transferOffset,
                             int toTransfer,
                             int bufferSize)
                      throws java.io.IOException
        Sequentially read bytes from the file and write them to the output stream
        Parameters:
        proxy - The file reader to read from
        validator - validator to verify data integrity
        start - The readd offset from the beginning of the proxy file.
        transferOffset - number of bytes to skip transfer, but include for validation.
        toTransfer - The number of bytes to be transferred.
        Returns:
        Number of bytes transferred.
        Throws:
        java.io.IOException - on any I/O error