Class BigTableReader
- java.lang.Object
-
- org.apache.cassandra.io.sstable.SSTable
-
- org.apache.cassandra.io.sstable.format.SSTableReader
-
- org.apache.cassandra.io.sstable.format.big.BigTableReader
-
- All Implemented Interfaces:
RefCounted<SSTableReader>
,SelfRefCounted<SSTableReader>
public class BigTableReader extends SSTableReader
SSTableReaders are open()ed by Keyspace.onStart; after that they are created by SSTableWriter.renameAndOpen. Do not re-call open() on existing SSTable files; use the references kept by ColumnFamilyStore post-start instead.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.cassandra.io.sstable.format.SSTableReader
SSTableReader.Factory, SSTableReader.IndexesBounds, SSTableReader.OpenReason, SSTableReader.Operator, SSTableReader.PartitionPositionBounds, SSTableReader.UniqueIdentifier
-
Nested classes/interfaces inherited from interface org.apache.cassandra.utils.concurrent.RefCounted
RefCounted.Tidy
-
-
Field Summary
-
Fields inherited from class org.apache.cassandra.io.sstable.format.SSTableReader
bf, bloomFilterTracker, dfile, generationReverseComparator, header, ifile, indexSummary, instanceId, isSuspect, keyCache, keyCacheHit, keyCacheRequest, maxDataAge, maxTimestampAscending, maxTimestampDescending, openReason, rowIndexEntrySerializer, sizeComparator, sstableComparator, sstableMetadata, sstableOrdering
-
Fields inherited from class org.apache.cassandra.io.sstable.SSTable
components, compression, descriptor, first, last, metadata, optimizationStrategy, TOMBSTONE_HISTOGRAM_BIN_SIZE, TOMBSTONE_HISTOGRAM_SPOOL_SIZE, TOMBSTONE_HISTOGRAM_TTL_ROUND_SECONDS
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected RowIndexEntry
getPosition(PartitionPosition key, SSTableReader.Operator op, boolean updateCacheAndStats, boolean permitMatchPastLast, SSTableReadsListener listener)
ISSTableScanner
getScanner()
Direct I/O SSTableScanner over the full sstable.ISSTableScanner
getScanner(java.util.Collection<Range<Token>> ranges)
Direct I/O SSTableScanner over a defined collection of ranges of tokens.ISSTableScanner
getScanner(java.util.Iterator<AbstractBounds<PartitionPosition>> boundsIterator)
Direct I/O SSTableScanner over an iterator of bounds.ISSTableScanner
getScanner(ColumnFilter columns, DataRange dataRange, SSTableReadsListener listener)
UnfilteredRowIterator
iterator(DecoratedKey key, Slices slices, ColumnFilter selectedColumns, boolean reversed, SSTableReadsListener listener)
UnfilteredRowIterator
iterator(FileDataInput file, DecoratedKey key, RowIndexEntry indexEntry, Slices slices, ColumnFilter selectedColumns, boolean reversed)
UnfilteredRowIterator
simpleIterator(FileDataInput dfile, DecoratedKey key, RowIndexEntry position, boolean tombstoneOnly)
-
Methods inherited from class org.apache.cassandra.io.sstable.format.SSTableReader
addTo, cacheKey, cloneAndReplace, cloneWithNewStart, cloneWithNewSummarySamplingLevel, cloneWithRestoredStart, createLinks, createLinks, createLinks, createLinks, equals, estimateCompactionGain, estimatedKeys, estimatedKeysForRanges, firstKeyBeyond, getApproximateKeyCount, getAvgColumnSetPerRow, getBloomFilter, getBloomFilterFalsePositiveCount, getBloomFilterOffHeapSize, getBloomFilterSerializedSize, getBloomFilterTrueNegativeCount, getBloomFilterTruePositiveCount, getCachedPosition, getCachedPosition, getCacheKey, getCompressionMetadata, getCompressionMetadataOffHeapSize, getCompressionRatio, getCrcCheckChance, getCreationTimeFor, getDataChannel, getDroppableTombstonesBefore, getEffectiveIndexInterval, getEstimatedCellPerPartitionCount, getEstimatedDroppableTombstoneRatio, getEstimatedPartitionSize, getFileDataInput, getFilename, getIndexChannel, getIndexFile, getIndexScanPosition, getIndexScanPositionFromBinarySearchResult, getIndexSummaryIndexFromBinarySearchResult, getIndexSummaryKey, getIndexSummaryOffHeapSize, getIndexSummarySamplingLevel, getIndexSummarySize, getKeyCache, getKeyCacheHit, getKeyCacheRequest, getKeySamples, getMaxIndexSummarySize, getMaxLocalDeletionTime, getMaxTimestamp, getMaxTTL, getMinIndexInterval, getMinLocalDeletionTime, getMinTimestamp, getMinTTL, getPendingRepair, getPosition, getPosition, getPosition, getPositionsForRanges, getReadMeter, getRecentBloomFilterFalsePositiveCount, getRecentBloomFilterTrueNegativeCount, getRecentBloomFilterTruePositiveCount, getRepairedAt, getScanner, getSSTableLevel, getSSTableMetadata, getTotalBytes, getTotalColumnsSet, getTotalRows, getTotalUncompressedBytes, hashCode, incrementReadCount, internalOpen, intersects, isKeyCacheEnabled, isMarkedCompacted, isMarkedSuspect, isPendingRepair, isRepaired, isReplaced, isTransient, keyAt, markObsolete, markSuspect, mayHaveTombstones, moveAndOpenSSTable, mutateLevelAndReload, mutateRepairedAndReload, newSince, onDiskLength, open, open, open, open, openAll, openDataReader, openDataReader, openForBatch, openIndexReader, openNoValidation, openNoValidation, overrideReadMeter, ref, releaseSummary, reloadSSTableMetadata, resetTidying, runOnClose, runWithLock, saveBloomFilter, saveSummary, selfRef, setCrcCheckChance, setReplaced, setupOnline, shutdownBlocking, stats, tryRef, uncompressedLength, unmarkSuspect, verifyCompressionInfoExistenceIfApplicable
-
Methods inherited from class org.apache.cassandra.io.sstable.SSTable
addComponents, appendTOC, bytesOnDisk, componentsFor, decorateKey, delete, discoverComponentsFor, estimateRowsFromIndex, getAllFilePaths, getBounds, getColumnFamilyName, getIndexFilename, getKeyspaceName, getMinimalKey, getPartitioner, metadata, readTOC, readTOC, toString, tryComponentFromFilename, tryDescriptorFromFilename, validateRepairedMetadata
-
-
-
-
Method Detail
-
iterator
public UnfilteredRowIterator iterator(DecoratedKey key, Slices slices, ColumnFilter selectedColumns, boolean reversed, SSTableReadsListener listener)
- Specified by:
iterator
in classSSTableReader
-
iterator
public UnfilteredRowIterator iterator(FileDataInput file, DecoratedKey key, RowIndexEntry indexEntry, Slices slices, ColumnFilter selectedColumns, boolean reversed)
- Specified by:
iterator
in classSSTableReader
-
getScanner
public ISSTableScanner getScanner(ColumnFilter columns, DataRange dataRange, SSTableReadsListener listener)
- Specified by:
getScanner
in classSSTableReader
- Parameters:
columns
- the columns to return.dataRange
- filter to use when reading the columnslistener
- a listener used to handle internal read events- Returns:
- A Scanner for seeking over the rows of the SSTable.
-
getScanner
public ISSTableScanner getScanner(java.util.Iterator<AbstractBounds<PartitionPosition>> boundsIterator)
Direct I/O SSTableScanner over an iterator of bounds.- Specified by:
getScanner
in classSSTableReader
- Parameters:
boundsIterator
- the keys to cover- Returns:
- A Scanner for seeking over the rows of the SSTable.
-
getScanner
public ISSTableScanner getScanner()
Direct I/O SSTableScanner over the full sstable.- Specified by:
getScanner
in classSSTableReader
- Returns:
- A Scanner for reading the full SSTable.
-
getScanner
public ISSTableScanner getScanner(java.util.Collection<Range<Token>> ranges)
Direct I/O SSTableScanner over a defined collection of ranges of tokens.- Specified by:
getScanner
in classSSTableReader
- Parameters:
ranges
- the range of keys to cover- Returns:
- A Scanner for seeking over the rows of the SSTable.
-
simpleIterator
public UnfilteredRowIterator simpleIterator(FileDataInput dfile, DecoratedKey key, RowIndexEntry position, boolean tombstoneOnly)
- Specified by:
simpleIterator
in classSSTableReader
-
getPosition
protected RowIndexEntry getPosition(PartitionPosition key, SSTableReader.Operator op, boolean updateCacheAndStats, boolean permitMatchPastLast, SSTableReadsListener listener)
- Specified by:
getPosition
in classSSTableReader
- Parameters:
key
- The key to apply as the rhs to the given Operator. A 'fake' key is allowed to allow key selection by token bounds but only if op != * EQop
- The Operator defining matching keys: the nearest key to the target matching the operator wins.updateCacheAndStats
- true if updating stats and cachelistener
- a listener used to handle internal events- Returns:
- The index entry corresponding to the key, or null if the key is not present
-
-