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:
UnfilteredSource,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, header, idComparator, idReverseComparator, 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 RowIndexEntrygetPosition(PartitionPosition key, SSTableReader.Operator op, boolean updateCacheAndStats, boolean permitMatchPastLast, SSTableReadsListener listener)ISSTableScannergetScanner()Direct I/O SSTableScanner over the full sstable.ISSTableScannergetScanner(java.util.Collection<Range<Token>> ranges)Direct I/O SSTableScanner over a defined collection of ranges of tokens.ISSTableScannergetScanner(java.util.Iterator<AbstractBounds<PartitionPosition>> boundsIterator)Direct I/O SSTableScanner over an iterator of bounds.ISSTableScannerpartitionIterator(ColumnFilter columns, DataRange dataRange, SSTableReadsListener listener)Returns a partition iterator for the given data range.UnfilteredRowIteratorrowIterator(DecoratedKey key, Slices slices, ColumnFilter selectedColumns, boolean reversed, SSTableReadsListener listener)Returns a row iterator for the given partition, applying the specified row and column filters.UnfilteredRowIteratorrowIterator(FileDataInput file, DecoratedKey key, RowIndexEntry indexEntry, Slices slices, ColumnFilter selectedColumns, boolean reversed)UnfilteredRowIteratorsimpleIterator(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, maybePresent, 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, getComponents, getIndexFilename, getKeyspaceName, getMinimalKey, getPartitioner, metadata, readTOC, readTOC, toString, tryComponentFromFilename, tryDescriptorFromFilename, validateRepairedMetadata
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.cassandra.db.rows.UnfilteredSource
rowIterator
-
-
-
-
Method Detail
-
rowIterator
public UnfilteredRowIterator rowIterator(DecoratedKey key, Slices slices, ColumnFilter selectedColumns, boolean reversed, SSTableReadsListener listener)
Description copied from interface:UnfilteredSourceReturns a row iterator for the given partition, applying the specified row and column filters.- Parameters:
key- the partition keyslices- the row ranges to returnselectedColumns- filter to apply to all returned partitionsreversed- true if the content should be returned in reverse orderlistener- a listener used to handle internal read events
-
rowIterator
public UnfilteredRowIterator rowIterator(FileDataInput file, DecoratedKey key, RowIndexEntry indexEntry, Slices slices, ColumnFilter selectedColumns, boolean reversed)
- Specified by:
rowIteratorin classSSTableReader
-
partitionIterator
public ISSTableScanner partitionIterator(ColumnFilter columns, DataRange dataRange, SSTableReadsListener listener)
Description copied from interface:UnfilteredSourceReturns a partition iterator for the given data range.- Parameters:
columns- filter to apply to all returned partitionsdataRange- the partition and clustering range queriedlistener- a listener used to handle internal read events
-
getScanner
public ISSTableScanner getScanner(java.util.Iterator<AbstractBounds<PartitionPosition>> boundsIterator)
Direct I/O SSTableScanner over an iterator of bounds.- Specified by:
getScannerin 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:
getScannerin 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:
getScannerin 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:
simpleIteratorin classSSTableReader
-
getPosition
protected RowIndexEntry getPosition(PartitionPosition key, SSTableReader.Operator op, boolean updateCacheAndStats, boolean permitMatchPastLast, SSTableReadsListener listener)
- Specified by:
getPositionin 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
-
-