public abstract class Rows
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static Row |
EMPTY_STATIC_ROW |
Modifier and Type | Method and Description |
---|---|
static int |
collectStats(Row row,
PartitionStatisticsCollector collector)
Collect statistics on a given row.
|
static Row.Builder |
copy(Row row,
Row.Builder builder) |
static void |
diff(RowDiffListener diffListener,
Row merged,
Row... inputs)
Given the result (
merged ) of merging multiple inputs , signals the difference between
each input and merged to diffListener . |
static Row |
merge(Row row1,
Row row2,
int nowInSec) |
static long |
merge(Row existing,
Row update,
Row.Builder builder,
int nowInSec)
Merges two rows into the given builder, mainly for merging memtable rows.
|
public static final Row EMPTY_STATIC_ROW
public static Row.Builder copy(Row row, Row.Builder builder)
public static int collectStats(Row row, PartitionStatisticsCollector collector)
row
- the row for which to collect stats.collector
- the stats collector.row
.public static void diff(RowDiffListener diffListener, Row merged, Row... inputs)
merged
) of merging multiple inputs
, signals the difference between
each input and merged
to diffListener
.
Note that this method doesn't only emit cells etc where there's a difference. The listener is informed of every corresponding entity between the merged and input rows, including those that are equal.
diffListener
- the listener to which to signal the differences between the inputs and the merged result.merged
- the result of merging inputs
.inputs
- the inputs whose merge yielded merged
.public static long merge(Row existing, Row update, Row.Builder builder, int nowInSec)
Note that this method assumes that the provided rows can meaningfully be reconciled together. That is, that the rows share the same clustering value, and belong to the same partition.
existing
- update
- builder
- the row build to which the result of the reconciliation is written.nowInSec
- the current time in seconds (which plays a role during reconciliation
because deleted cells always have precedence on timestamp equality and deciding if a
cell is a live or not depends on the current time due to expiring cells).existing
and those in existing
.Copyright © 2016 The Apache Software Foundation