|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cassandra.io.sstable.SSTable
org.apache.cassandra.io.sstable.SSTableReader
public class SSTableReader
SSTableReaders are open()ed by Table.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 | |
---|---|
static class |
SSTableReader.Operator
TODO: Move someplace reusable |
Field Summary | |
---|---|
long |
maxDataAge
maxDataAge is a timestamp in local server time (e.g. |
Fields inherited from class org.apache.cassandra.io.sstable.SSTable |
---|
COMPONENT_DATA, COMPONENT_FILTER, COMPONENT_INDEX, COMPONENT_STATS, components, compression, descriptor, first, last, maxTimestampComparator, metadata, partitioner, sstableComparator, sstableOrdering, TEMPFILE_MARKER |
Method Summary | |
---|---|
boolean |
acquireReference()
|
static boolean |
acquireReferences(java.lang.Iterable<SSTableReader> sstables)
|
static java.util.Collection<SSTableReader> |
batchOpen(java.util.Set<java.util.Map.Entry<Descriptor,java.util.Set<Component>>> entries,
java.util.Set<DecoratedKey> savedKeys,
DataTracker tracker,
CFMetaData metadata,
IPartitioner partitioner)
|
void |
cacheKey(DecoratedKey key,
java.lang.Long info)
|
void |
createLinks(java.lang.String snapshotDirectoryPath)
|
static DecoratedKey |
decodeKey(IPartitioner p,
Descriptor d,
java.nio.ByteBuffer bytes)
Conditionally use the deprecated 'IPartitioner.convertFromDiskFormat' method. |
long |
estimatedKeys()
|
long |
estimatedKeysForRanges(java.util.Collection<Range> ranges)
|
void |
forceFilterFailures()
For testing purposes only. |
static long |
getApproximateKeyCount(java.lang.Iterable<SSTableReader> sstables)
|
Filter |
getBloomFilter()
|
long |
getBloomFilterFalsePositiveCount()
|
long |
getBloomFilterTruePositiveCount()
|
java.lang.Long |
getCachedPosition(DecoratedKey key,
boolean updateStats)
|
SSTableScanner |
getDirectScanner()
Direct I/O SSTableScanner |
SSTableScanner |
getDirectScanner(Range range)
Direct I/O SSTableScanner over a defined range of tokens. |
EstimatedHistogram |
getEstimatedColumnCount()
|
EstimatedHistogram |
getEstimatedRowSize()
|
FileDataInput |
getFileDataInput(DecoratedKey decoratedKey,
int bufferSize)
|
InstrumentingCache<Pair<Descriptor,DecoratedKey>,java.lang.Long> |
getKeyCache()
|
java.util.Collection<DecoratedKey> |
getKeySamples()
|
java.lang.Iterable<DecoratedKey> |
getKeySamples(Range range)
|
long |
getMaxTimestamp()
|
long |
getPosition(DecoratedKey decoratedKey,
SSTableReader.Operator op)
|
java.util.List<Pair<java.lang.Long,java.lang.Long>> |
getPositionsForRanges(java.util.Collection<Range> ranges)
Determine the minimal set of sections that can be extracted from this SSTable to cover the given ranges. |
long |
getRecentBloomFilterFalsePositiveCount()
|
long |
getRecentBloomFilterTruePositiveCount()
|
ReplayPosition |
getReplayPosition()
|
SSTableScanner |
getScanner(QueryFilter filter)
|
static void |
logOpenException(Descriptor descriptor,
java.io.IOException e)
|
void |
markCompacted()
Mark the sstable as compacted. |
boolean |
newSince(long age)
Tests if the sstable contains data newer than the given age param (in localhost currentMilli time). |
long |
onDiskLength()
|
static SSTableReader |
open(Descriptor desc)
|
static SSTableReader |
open(Descriptor desc,
CFMetaData metadata)
|
static SSTableReader |
open(Descriptor descriptor,
java.util.Set<Component> components,
CFMetaData metadata,
IPartitioner partitioner)
|
static SSTableReader |
open(Descriptor descriptor,
java.util.Set<Component> components,
java.util.Set<DecoratedKey> savedKeys,
DataTracker tracker,
CFMetaData metadata,
IPartitioner partitioner)
|
RandomAccessReader |
openDataReader(boolean skipIOCache)
|
static long |
readRowSize(java.io.DataInput in,
Descriptor d)
|
void |
releaseReference()
|
static void |
releaseReferences(java.lang.Iterable<SSTableReader> sstables)
|
void |
setTrackedBy(DataTracker tracker)
|
long |
uncompressedLength()
|
Methods inherited from class org.apache.cassandra.io.sstable.SSTable |
---|
bytesOnDisk, delete, getColumnFamilyName, getFilename, getMinimalKey, getTableName, getTotalBytes, toString, tryComponentFromFilename |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final long maxDataAge
Method Detail |
---|
public static long getApproximateKeyCount(java.lang.Iterable<SSTableReader> sstables)
public static SSTableReader open(Descriptor desc) throws java.io.IOException
java.io.IOException
public static SSTableReader open(Descriptor desc, CFMetaData metadata) throws java.io.IOException
java.io.IOException
public static SSTableReader open(Descriptor descriptor, java.util.Set<Component> components, CFMetaData metadata, IPartitioner partitioner) throws java.io.IOException
java.io.IOException
public static SSTableReader open(Descriptor descriptor, java.util.Set<Component> components, java.util.Set<DecoratedKey> savedKeys, DataTracker tracker, CFMetaData metadata, IPartitioner partitioner) throws java.io.IOException
java.io.IOException
public static void logOpenException(Descriptor descriptor, java.io.IOException e)
public static java.util.Collection<SSTableReader> batchOpen(java.util.Set<java.util.Map.Entry<Descriptor,java.util.Set<Component>>> entries, java.util.Set<DecoratedKey> savedKeys, DataTracker tracker, CFMetaData metadata, IPartitioner partitioner)
public void setTrackedBy(DataTracker tracker)
public void forceFilterFailures()
public Filter getBloomFilter()
public long estimatedKeys()
public long estimatedKeysForRanges(java.util.Collection<Range> ranges)
ranges
-
public java.util.Collection<DecoratedKey> getKeySamples()
public java.lang.Iterable<DecoratedKey> getKeySamples(Range range)
public java.util.List<Pair<java.lang.Long,java.lang.Long>> getPositionsForRanges(java.util.Collection<Range> ranges)
public void cacheKey(DecoratedKey key, java.lang.Long info)
public java.lang.Long getCachedPosition(DecoratedKey key, boolean updateStats)
public long getPosition(DecoratedKey decoratedKey, SSTableReader.Operator op)
decoratedKey
- The key to apply as the rhs to the given Operator.op
- The Operator defining matching keys: the nearest key to the target matching the operator wins.
public long uncompressedLength()
public long onDiskLength()
public boolean acquireReference()
public void releaseReference()
public void markCompacted()
public SSTableScanner getScanner(QueryFilter filter)
filter
- filter to use when reading the columns
public SSTableScanner getDirectScanner()
public SSTableScanner getDirectScanner(Range range)
range
- the range of keys to cover
public FileDataInput getFileDataInput(DecoratedKey decoratedKey, int bufferSize)
public boolean newSince(long age)
age
- The age to compare the maxDataAre of this sstable. Measured in millisec since epoc on this host
public static long readRowSize(java.io.DataInput in, Descriptor d) throws java.io.IOException
java.io.IOException
public void createLinks(java.lang.String snapshotDirectoryPath) throws java.io.IOException
java.io.IOException
public static DecoratedKey decodeKey(IPartitioner p, Descriptor d, java.nio.ByteBuffer bytes)
public long getBloomFilterFalsePositiveCount()
public long getRecentBloomFilterFalsePositiveCount()
public long getBloomFilterTruePositiveCount()
public long getRecentBloomFilterTruePositiveCount()
public InstrumentingCache<Pair<Descriptor,DecoratedKey>,java.lang.Long> getKeyCache()
public EstimatedHistogram getEstimatedRowSize()
public EstimatedHistogram getEstimatedColumnCount()
public ReplayPosition getReplayPosition()
public long getMaxTimestamp()
public RandomAccessReader openDataReader(boolean skipIOCache) throws java.io.IOException
java.io.IOException
public static boolean acquireReferences(java.lang.Iterable<SSTableReader> sstables)
sstables
-
public static void releaseReferences(java.lang.Iterable<SSTableReader> sstables)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |