public class CachedBTreePartition extends ImmutableBTreePartition implements CachedPartition
AbstractBTreePartition.Holder, AbstractBTreePartition.SliceableIterator, AbstractBTreePartition.SlicesIterator
holder
EMPTY, metadata, 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 |
nonExpiringLiveCells()
The number of cells in this cached partition that are neither tombstone nor expiring.
|
int |
nonTombstoneCellCount()
The number of
cell objects that are not tombstone in this cached partition. |
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
build, build, build, columns, deletionInfo, getRow, hasRows, isEmpty, iterator, lastRow, metadata, partitionKey, partitionLevelDeletion, rowCount, searchIterator, sliceableUnfilteredIterator, sliceableUnfilteredIterator, staticRow, stats, toString, unfilteredIterator, unfilteredIterator, unfilteredIterator
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
lastRow, rowCount
columns, getRow, isEmpty, metadata, partitionKey, partitionLevelDeletion, searchIterator, stats, 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)
to see why we need this.cachedLiveRows
in interface CachedPartition
public int rowsWithNonExpiringCells()
DataLimits.hasEnoughLiveData(org.apache.cassandra.db.partitions.CachedPartition, int)
as an optimization.rowsWithNonExpiringCells
in interface CachedPartition
public int nonTombstoneCellCount()
CachedPartition
cell
objects that are not tombstone in this cached partition.
Please note that this is not the number of live cells since
some of the cells might be expired.nonTombstoneCellCount
in interface CachedPartition
public int nonExpiringLiveCells()
CachedPartition
DataLimits#hasEnoughLiveData
as an optimization.nonExpiringLiveCells
in interface CachedPartition
Copyright © 2017 The Apache Software Foundation