public class IndexSummary extends WrappedSharedCloseable
Modifier and Type | Class and Description |
---|---|
static class |
IndexSummary.IndexSummarySerializer |
Modifier and Type | Field and Description |
---|---|
static IndexSummary.IndexSummarySerializer |
serializer |
Constructor and Description |
---|
IndexSummary(IPartitioner partitioner,
Memory offsets,
int offsetCount,
Memory entries,
long entriesLength,
int sizeAtFullSampling,
int minIndexInterval,
int samplingLevel) |
Modifier and Type | Method and Description |
---|---|
int |
binarySearch(RowPosition key) |
double |
getEffectiveIndexInterval() |
int |
getEffectiveIndexIntervalAfterIndex(int index)
Returns the number of primary (on-disk) index entries between the index summary entry at `index` and the next
index summary entry (assuming there is one).
|
long |
getEndInSummary(int index) |
long |
getEstimatedKeyCount()
Returns an estimate of the total number of keys in the SSTable.
|
byte[] |
getKey(int index) |
int |
getMaxNumberOfEntries()
Returns the number of entries this summary would have if it were at the full sampling level, which is equal
to the number of entries in the primary on-disk index divided by the min index interval.
|
int |
getMinIndexInterval() |
long |
getOffHeapSize() |
long |
getPosition(int index) |
int |
getPositionInSummary(int index)
Gets the position of the actual index summary entry in our Memory attribute, 'bytes'.
|
int |
getSamplingLevel() |
IndexSummary |
sharedCopy() |
int |
size() |
close, close, isCleanedUp
public static final IndexSummary.IndexSummarySerializer serializer
public IndexSummary(IPartitioner partitioner, Memory offsets, int offsetCount, Memory entries, long entriesLength, int sizeAtFullSampling, int minIndexInterval, int samplingLevel)
public int binarySearch(RowPosition key)
public int getPositionInSummary(int index)
index
- The index of the entry or key to get the position forpublic byte[] getKey(int index)
public long getPosition(int index)
public long getEndInSummary(int index)
public int getMinIndexInterval()
public double getEffectiveIndexInterval()
public long getEstimatedKeyCount()
public int size()
public int getSamplingLevel()
public int getMaxNumberOfEntries()
public long getOffHeapSize()
public int getEffectiveIndexIntervalAfterIndex(int index)
index
- the index of an index summary entry (between zero and the index entry size)public IndexSummary sharedCopy()
Copyright © 2016 The Apache Software Foundation