Class IndexOutputWriter

java.lang.Object
org.apache.lucene.store.DataOutput
org.apache.lucene.store.IndexOutput
org.apache.cassandra.index.sai.disk.io.IndexOutputWriter
All Implemented Interfaces:
Closeable, AutoCloseable

@NotThreadSafe public class IndexOutputWriter extends org.apache.lucene.store.IndexOutput
This is a wrapper over a Cassandra SequentialWriter that provides a Lucene IndexOutput interface for the Lucene index writers.
  • Constructor Details

  • Method Details

    • skipBytes

      public void skipBytes(long length) throws IOException
      Throws:
      IOException
    • getFile

      public File getFile()
    • getChecksum

      public long getChecksum() throws IOException
      Specified by:
      getChecksum in class org.apache.lucene.store.IndexOutput
      Throws:
      IOException
    • getFilePointer

      public long getFilePointer()
      Specified by:
      getFilePointer in class org.apache.lucene.store.IndexOutput
    • writeBytes

      public void writeBytes(byte[] bytes, int offset, int len) throws IOException
      Specified by:
      writeBytes in class org.apache.lucene.store.DataOutput
      Throws:
      IOException
    • writeByte

      public void writeByte(byte b) throws IOException
      Specified by:
      writeByte in class org.apache.lucene.store.DataOutput
      Throws:
      IOException
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in class org.apache.lucene.store.IndexOutput
    • toString

      public String toString()
      Overrides:
      toString in class org.apache.lucene.store.IndexOutput
    • asSequentialWriter

      public SequentialWriter asSequentialWriter()
      Returns SequentialWriter associated with this writer. Convenient when interacting with Cassandra codebase to write files to disk. Note that all bytes written to the returned writer will still contribute to the checksum.
      Returns:
      SequentialWriter associated with this writer