Class TrieTermsDictionaryWriter

java.lang.Object
org.apache.cassandra.index.sai.disk.v1.trie.TrieTermsDictionaryWriter
All Implemented Interfaces:
Closeable, AutoCloseable

@NotThreadSafe public class TrieTermsDictionaryWriter extends Object implements Closeable
Writes terms dictionary to disk in a trie format (see IncrementalTrieWriter).

Allows for variable-length keys. Trie values are 64-bit offsets to the posting file, pointing to the beginning of summary block for that postings list.

  • Method Details

    • add

      public void add(ByteComparable term, long postingListOffset) throws IOException
      Throws:
      IOException
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
    • complete

      public long complete(org.apache.commons.lang3.mutable.MutableLong footerPointer) throws IOException
      complete trie index and write footer
      Returns:
      the position in the file of the root node.
      Throws:
      IOException
    • getFilePointer

      public long getFilePointer()
      Returns:
      current file pointer
    • getStartOffset

      public long getStartOffset()
      Returns:
      file pointer where index structure begins