public class CachedBTreePartition extends ImmutableBTreePartition implements CachedPartition
AbstractBTreePartition.Holder
holder, metadata
EMPTY, HOLDER_UNSHARED_HEAP_SIZE, partitionKey
cacheSerializer
Modifier and Type | Method and Description |
---|---|
int |
cachedLiveRows()
The number of rows that were live at the time the partition was cached.
|
static CachedBTreePartition |
create(UnfilteredRowIterator iterator,
int nowInSec)
Creates an
ArrayBackedCachedPartition holding all the data of the provided iterator. |
static CachedBTreePartition |
create(UnfilteredRowIterator iterator,
int initialRowCapacity,
int nowInSec)
Creates an
ArrayBackedCachedPartition holding all the data of the provided iterator. |
int |
rowsWithNonExpiringCells()
The number of rows in this cached partition that have at least one non-expiring
non-deleted cell.
|
canHaveShadowedData, create, create, create, holder, metadata
build, build, build, columns, deletionInfo, equals, getRow, hasRows, isEmpty, iterator, lastRow, partitionKey, partitionLevelDeletion, rowCount, staticRow, stats, toString, toString, unfilteredIterator, unfilteredIterator, unfilteredIterator, unfilteredIterator, unsafeConstructHolder, unsafeGetEmptyHolder
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
lastRow, rowCount
columns, getRow, hasRows, isEmpty, metadata, partitionKey, partitionLevelDeletion, stats, unfilteredIterator, unfilteredIterator, unfilteredIterator
public static CachedBTreePartition create(UnfilteredRowIterator iterator, int nowInSec)
ArrayBackedCachedPartition
holding all the data of the provided iterator.
Warning: Note that this method does not close the provided iterator and it is
up to the caller to do so.iterator
- the iterator got gather in memory.nowInSec
- the time of the creation in seconds. This is the time at which cachedLiveRows
applies.public static CachedBTreePartition create(UnfilteredRowIterator iterator, int initialRowCapacity, int nowInSec)
ArrayBackedCachedPartition
holding all the data of the provided iterator.
Warning: Note that this method does not close the provided iterator and it is
up to the caller to do so.iterator
- the iterator got gather in memory.initialRowCapacity
- sizing hint (in rows) to use for the created partition. It should ideally
correspond or be a good estimation of the number or rows in iterator
.nowInSec
- the time of the creation in seconds. This is the time at which cachedLiveRows
applies.public int cachedLiveRows()
ColumnFamilyStore.isFilterFullyCoveredBy(org.apache.cassandra.db.filter.ClusteringIndexFilter, org.apache.cassandra.db.filter.DataLimits, org.apache.cassandra.db.partitions.CachedPartition, int, boolean)
to see why we need this.cachedLiveRows
in interface CachedPartition
public int rowsWithNonExpiringCells()
DataLimits.hasEnoughLiveData(org.apache.cassandra.db.partitions.CachedPartition, int, boolean, boolean)
as an optimization.rowsWithNonExpiringCells
in interface CachedPartition
Copyright © 2009- The Apache Software Foundation