public abstract class Cells
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
addNonShadowed(Cell<?> existing,
Cell<?> update,
DeletionTime deletion,
Row.Builder builder)
Adds to the builder a representation of the given existing cell that, when merged/reconciled with the given
update cell, produces the same result as merging the original with the update.
|
static void |
addNonShadowedComplex(ColumnMetadata column,
java.util.Iterator<Cell<?>> existing,
java.util.Iterator<Cell<?>> update,
DeletionTime deletion,
Row.Builder builder)
Adds to the builder a representation of the given existing cell that, when merged/reconciled with the given
update cell, produces the same result as merging the original with the update.
|
static void |
collectStats(Cell<?> cell,
PartitionStatisticsCollector collector)
Collect statistics ont a given cell.
|
static <T,V> T |
composeValue(Cell<V> cell,
AbstractType<T> type) |
static Cell<?> |
reconcile(Cell<?> c1,
Cell<?> c2)
Reconciles/merge two cells.
|
static <L,R> boolean |
valueEqual(Cell<L> left,
Cell<R> right) |
static <V> java.lang.String |
valueString(Cell<V> cell) |
static <V> java.lang.String |
valueString(Cell<V> cell,
AbstractType<?> type) |
public static void collectStats(Cell<?> cell, PartitionStatisticsCollector collector)
cell
- the cell for which to collect stats.collector
- the stats collector.public static Cell<?> reconcile(Cell<?> c1, Cell<?> c2)
Note that this method assumes that the provided cells can meaningfully be reconciled together, that is that cell are for the same row and same column (and same cell path if the column is complex).
This method is commutative over it's cells arguments: reconcile(a, b, n) == reconcile(b, a, n)
.
c1
- the first cell participating in the reconciliation.c2
- the second cell participating in the reconciliation.c1
and c2
.
For non-counter cells, this will always be either c1
or c2
, but for
counter cells this can be a newly allocated cell.public static void addNonShadowed(Cell<?> existing, Cell<?> update, DeletionTime deletion, Row.Builder builder)
For simple cells that is either the original cell (if still live), or nothing (if shadowed).
existing
- the pre-existing cell, the one that is updated.update
- the newly added cell, the update. This can be null
out
of convenience, in which case this function simply copy existing
to
writer
.deletion
- the deletion time that applies to the cells being considered.
This deletion time may delete both existing
or update
.builder
- the row builder to which the result of the filtering is written.public static void addNonShadowedComplex(ColumnMetadata column, java.util.Iterator<Cell<?>> existing, java.util.Iterator<Cell<?>> update, DeletionTime deletion, Row.Builder builder)
For simple cells that is either the original cell (if still live), or nothing (if shadowed).
column
- the complex column the cells are for.existing
- the pre-existing cells, the ones that are updated.update
- the newly added cells, the update. This can be null
out
of convenience, in which case this function simply copy the cells from
existing
to writer
.deletion
- the deletion time that applies to the cells being considered.
This deletion time may delete both existing
or update
.builder
- the row builder to which the result of the filtering is written.public static <T,V> T composeValue(Cell<V> cell, AbstractType<T> type)
public static <V> java.lang.String valueString(Cell<V> cell, AbstractType<?> type)
public static <V> java.lang.String valueString(Cell<V> cell)
Copyright © 2009- The Apache Software Foundation