Class RowIndexReader

java.lang.Object
org.apache.cassandra.io.tries.Walker<RowIndexReader>
org.apache.cassandra.io.sstable.format.bti.RowIndexReader
All Implemented Interfaces:
AutoCloseable

@NotThreadSafe public class RowIndexReader extends Walker<RowIndexReader>
Reader class for row index files created by RowIndexWriter.

Row index "tries" do not need to store whole keys, as what we need from them is to be able to tell where in the data file to start looking for a given key. Instead, we store some prefix that is greater than the greatest key of the previous index section and smaller than or equal to the smallest key of the next. So for a given key the first index section that could potentially contain it is given by the trie's floor for that key.

This builds upon the trie Walker class which provides basic trie walking functionality. The class is thread-unsafe and must be re-instantiated for every thread that needs access to the trie (its overhead is below that of a RandomAccessReader).