public IndexState(Reader reader, ClusteringComparator comparator, RowIndexEntry indexEntry, boolean reversed, FileHandle indexFile) { this.reader = reader; this.comparator = comparator; this.indexEntry = indexEntry; this.indexInfoRetriever = indexEntry.openWithIndex(indexFile); this.reversed = reversed; this.currentIndexIdx = reversed ? indexEntry.columnsIndexCount() : -1; }
public IndexState(Reader reader, ClusteringComparator comparator, RowIndexEntry indexEntry, boolean reversed, FileHandle indexFile) { this.reader = reader; this.comparator = comparator; this.indexEntry = indexEntry; this.indexInfoRetriever = indexEntry.openWithIndex(indexFile); this.reversed = reversed; this.currentIndexIdx = reversed ? indexEntry.columnsIndexCount() : -1; }
public IndexState(Reader reader, ClusteringComparator comparator, RowIndexEntry indexEntry, boolean reversed, FileHandle indexFile) { this.reader = reader; this.comparator = comparator; this.indexEntry = indexEntry; this.indexInfoRetriever = indexEntry.openWithIndex(indexFile); this.reversed = reversed; this.currentIndexIdx = reversed ? indexEntry.columnsIndexCount() : -1; }
public IndexState(Reader reader, ClusteringComparator comparator, RowIndexEntry indexEntry, boolean reversed, FileHandle indexFile) { this.reader = reader; this.comparator = comparator; this.indexEntry = indexEntry; this.indexInfoRetriever = indexEntry.openWithIndex(indexFile); this.reversed = reversed; this.currentIndexIdx = reversed ? indexEntry.columnsIndexCount() : -1; }
/** * @return the lower bound stored on the index entry for this partition, if available. */ private ClusteringBound getPartitionIndexLowerBound() { // NOTE: CASSANDRA-11206 removed the lookup against the key-cache as the IndexInfo objects are no longer // in memory for not heap backed IndexInfo objects (so, these are on disk). // CASSANDRA-11369 is there to fix this afterwards. // Creating the iterator ensures that rowIndexEntry is loaded if available (partitions bigger than // DatabaseDescriptor.column_index_size_in_kb) if (!canUseMetadataLowerBound()) maybeInit(); RowIndexEntry rowIndexEntry = null; try (RowIndexEntry.IndexInfoRetriever onHeapRetriever = rowIndexEntry.openWithIndex(null)) { IndexInfo column = onHeapRetriever.columnsIndex(filter.isReversed() ? rowIndexEntry.columnsIndexCount() - 1 : 0); ClusteringPrefix lowerBoundPrefix = filter.isReversed() ? column.lastName : column.firstName; assert lowerBoundPrefix.getRawValues().length <= sstable.metadata.comparator.size() : String.format("Unexpected number of clustering values %d, expected %d or fewer for %s", lowerBoundPrefix.getRawValues().length, sstable.metadata.comparator.size(), sstable.getFilename()); return ClusteringBound.inclusiveOpen(filter.isReversed(), lowerBoundPrefix.getRawValues()); } catch (IOException e) { throw new RuntimeException("should never occur", e); } }
return null; try (RowIndexEntry.IndexInfoRetriever onHeapRetriever = rowIndexEntry.openWithIndex(null))
return null; try (RowIndexEntry.IndexInfoRetriever onHeapRetriever = rowIndexEntry.openWithIndex(null))
return null; try (RowIndexEntry.IndexInfoRetriever onHeapRetriever = rowIndexEntry.openWithIndex(null))