public class IndexSummary
extends java.lang.Object
implements java.io.Closeable
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,
RefCountedMemory memory,
int summarySize,
int sizeAtFullSampling,
int minIndexInterval,
int samplingLevel) |
Modifier and Type | Method and Description |
---|---|
int |
binarySearch(RowPosition key) |
void |
close() |
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).
|
byte[] |
getEntry(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()
Returns the amount of off-heap memory used for this summary.
|
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 |
readOnlyClone() |
int |
size() |
public static final IndexSummary.IndexSummarySerializer serializer
public IndexSummary(IPartitioner partitioner, RefCountedMemory memory, int summarySize, 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 byte[] getEntry(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 void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
public IndexSummary readOnlyClone()
Copyright © 2014 The Apache Software Foundation