public abstract static class DataLimits.Counter extends StoppingTransformation<BaseRowIterator<?>>
Modifier and Type | Field and Description |
---|---|
protected boolean |
assumeLiveData |
protected int |
nowInSec |
Modifier | Constructor and Description |
---|---|
protected |
Counter(int nowInSec,
boolean assumeLiveData,
boolean enforceStrictLiveness) |
Modifier and Type | Method and Description |
---|---|
PartitionIterator |
applyTo(PartitionIterator partitions) |
RowIterator |
applyTo(RowIterator partition) |
UnfilteredPartitionIterator |
applyTo(UnfilteredPartitionIterator partitions) |
UnfilteredRowIterator |
applyTo(UnfilteredRowIterator partition) |
protected BaseRowIterator<?> |
applyToPartition(BaseRowIterator<?> partition)
Applied to any rows iterator (partition) we encounter in a partitions iterator
|
protected abstract void |
applyToPartition(DecoratedKey partitionKey,
Row staticRow) |
protected void |
attachTo(BasePartitions partitions) |
protected void |
attachTo(BaseRows rows) |
abstract int |
counted()
The number of results counted.
|
abstract int |
countedInCurrentPartition() |
abstract boolean |
isDone() |
abstract boolean |
isDoneForPartition() |
protected boolean |
isLive(Row row) |
void |
onClose()
Run on the close of any (logical) partitions iterator this function was applied to
We stipulate logical, because if applied to a transformed iterator the lifetime of the iterator
object may be longer than the lifetime of the "logical" iterator it was applied to; if the iterator
is refilled with MoreContents, for instance, the iterator may outlive this function
|
DataLimits.Counter |
onlyCount() |
abstract int |
rowCounted()
The number of rows counted.
|
abstract int |
rowCountedInCurrentPartition()
The number of rows counted in the current partition.
|
onPartitionClose, stop, stopInPartition
apply, apply, apply, apply, applyToDeletion, applyToMarker, applyToPartitionColumns, applyToPartitionKey, applyToRow, applyToStatic
protected final int nowInSec
protected final boolean assumeLiveData
protected Counter(int nowInSec, boolean assumeLiveData, boolean enforceStrictLiveness)
public DataLimits.Counter onlyCount()
public PartitionIterator applyTo(PartitionIterator partitions)
public UnfilteredPartitionIterator applyTo(UnfilteredPartitionIterator partitions)
public UnfilteredRowIterator applyTo(UnfilteredRowIterator partition)
public RowIterator applyTo(RowIterator partition)
public abstract int counted()
Note that the definition of "results" should be the same that for DataLimits.count()
.
public abstract int countedInCurrentPartition()
public abstract int rowCounted()
public abstract int rowCountedInCurrentPartition()
public abstract boolean isDone()
public abstract boolean isDoneForPartition()
protected boolean isLive(Row row)
protected BaseRowIterator<?> applyToPartition(BaseRowIterator<?> partition)
Transformation
applyToPartition
in class Transformation<BaseRowIterator<?>>
protected abstract void applyToPartition(DecoratedKey partitionKey, Row staticRow)
protected void attachTo(BasePartitions partitions)
attachTo
in class StoppingTransformation<BaseRowIterator<?>>
protected void attachTo(BaseRows rows)
attachTo
in class StoppingTransformation<BaseRowIterator<?>>
public void onClose()
Transformation
onClose
in class StoppingTransformation<BaseRowIterator<?>>
Copyright © 2020 The Apache Software Foundation