public IndexedSliceReader( SSTableReader sstable, FileDataInput input, ByteBuffer startColumn, ByteBuffer finishColumn, boolean reversed) { this.file = input; this.startColumn = startColumn; this.finishColumn = finishColumn; this.reversed = reversed; comparator = sstable.metadata.comparator; try { IndexHelper.skipBloomFilter(file); indexes = IndexHelper.deserializeIndex(file); emptyColumnFamily = ColumnFamily.serializer() .deserializeFromSSTableNoColumns(ColumnFamily.create(sstable.metadata), file); fetcher = indexes == null ? new SimpleBlockFetcher() : new IndexedBlockFetcher(); } catch (IOException e) { throw new IOError(e); } }
IndexedBlockFetcher() throws IOException { file.readInt(); // column count this.mark = file.mark(); curRangeIndex = IndexHelper.indexFor(startColumn, indexes, comparator, reversed); }