public abstract class UnfilteredRowIterators
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
UnfilteredRowIterators.MergeListener
Interface for a listener interested in the result of merging multiple versions of a given row.
|
Modifier and Type | Method and Description |
---|---|
static UnfilteredRowIterator |
concat(UnfilteredRowIterator iter1,
UnfilteredRowIterator iter2)
Returns an iterator that concatenate two atom iterators.
|
static UnfilteredRowIterator |
concat(Unfiltered first,
UnfilteredRowIterator rest)
Returns an iterator that concatenate the specified atom with the iterator.
|
static void |
digest(ReadCommand command,
UnfilteredRowIterator iterator,
java.security.MessageDigest digest,
int version)
Digests the partition represented by the provided iterator.
|
static RowIterator |
filter(UnfilteredRowIterator iter,
int nowInSec)
Returns a iterator that only returns rows with only live content.
|
static UnfilteredRowIterator |
loggingIterator(UnfilteredRowIterator iterator,
java.lang.String id,
boolean fullDetails)
Wraps the provided iterator so it logs the returned atoms for debugging purposes.
|
static UnfilteredRowIterator |
merge(java.util.List<UnfilteredRowIterator> iterators,
int nowInSec)
Returns an iterator that is the result of merging other iterators.
|
static UnfilteredRowIterator |
merge(java.util.List<UnfilteredRowIterator> iterators,
int nowInSec,
UnfilteredRowIterators.MergeListener mergeListener)
Returns an iterator that is the result of merging other iterators, and (optionally) using
specific MergeListener.
|
static UnfilteredRowIterator |
noRowsIterator(CFMetaData cfm,
DecoratedKey partitionKey,
Row staticRow,
DeletionTime partitionDeletion,
boolean isReverseOrder)
Returns an empty unfiltered iterator for a given partition.
|
static UnfilteredRowIterator |
singleton(Unfiltered unfiltered,
CFMetaData metadata,
DecoratedKey partitionKey,
DeletionTime partitionLevelDeletion,
PartitionColumns columns,
Row staticRow,
boolean isReverseOrder,
EncodingStats encodingStats) |
static UnfilteredRowIterator |
withOnlyQueriedData(UnfilteredRowIterator iterator,
ColumnFilter filter)
Filter the provided iterator to exclude cells that have been fetched but are not queried by the user
(see ColumnFilter for detailes).
|
static UnfilteredRowIterator |
withValidation(UnfilteredRowIterator iterator,
java.lang.String filename)
Validate that the data of the provided iterator is valid, that is that the values
it contains are valid for the type they represent, and more generally that the
infos stored are sensible.
|
public static RowIterator filter(UnfilteredRowIterator iter, int nowInSec)
public static UnfilteredRowIterator merge(java.util.List<UnfilteredRowIterator> iterators, int nowInSec)
public static UnfilteredRowIterator merge(java.util.List<UnfilteredRowIterator> iterators, int nowInSec, UnfilteredRowIterators.MergeListener mergeListener)
public static UnfilteredRowIterator noRowsIterator(CFMetaData cfm, DecoratedKey partitionKey, Row staticRow, DeletionTime partitionDeletion, boolean isReverseOrder)
public static UnfilteredRowIterator singleton(Unfiltered unfiltered, CFMetaData metadata, DecoratedKey partitionKey, DeletionTime partitionLevelDeletion, PartitionColumns columns, Row staticRow, boolean isReverseOrder, EncodingStats encodingStats)
public static void digest(ReadCommand command, UnfilteredRowIterator iterator, java.security.MessageDigest digest, int version)
command
- the command that has yield iterator
. This can be null if version >= MessagingService.VERSION_30
as this is only used when producing digest to be sent to legacy nodes.iterator
- the iterator to digest.digest
- the MessageDigest
to use for the digest.version
- the messaging protocol to use when producing the digest.public static UnfilteredRowIterator withOnlyQueriedData(UnfilteredRowIterator iterator, ColumnFilter filter)
iterator
- the iterator to filter.filter
- the ColumnFilter
to use when deciding which columns are the one queried by the
user. This should be the filter that was used when querying iterator
.public static UnfilteredRowIterator concat(UnfilteredRowIterator iter1, UnfilteredRowIterator iter2)
iter2
come after the ones of iter1
(that is, that concatenating the iterator
make sense).public static UnfilteredRowIterator concat(Unfiltered first, UnfilteredRowIterator rest)
public static UnfilteredRowIterator withValidation(UnfilteredRowIterator iterator, java.lang.String filename)
iterator
- the partition to check.filename
- the name of the file the data is comming from.iterator
but that
checks said data and throws a CorruptedSSTableException
if it detects
invalid data.public static UnfilteredRowIterator loggingIterator(UnfilteredRowIterator iterator, java.lang.String id, boolean fullDetails)
Note that this is only meant for debugging as this can log a very large amount of logging at INFO.
Copyright © 2020 The Apache Software Foundation