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) |
static long |
merge(Row existing,
Row update,
Row.Builder builder)
Merges two rows into the given builder, mainly for merging memtable rows.
|
static Row |
removeShadowedCells(Row existing,
Row update,
DeletionTime rangeDeletion)
Returns a row that is obtained from the given existing row by removing everything that is shadowed by data in
the update row.
|
static Row.SimpleBuilder |
simpleBuilder(TableMetadata metadata,
java.lang.Object... clusteringValues)
Creates a new simple row builder.
|
public static final Row EMPTY_STATIC_ROW
public static Row.Builder copy(Row row, Row.Builder builder)
public static Row.SimpleBuilder simpleBuilder(TableMetadata metadata, java.lang.Object... clusteringValues)
metadata
- the metadata of the table this is a row of.clusteringValues
- the value for the clustering columns of the row to add to this build. There may be no
values if either the table has no clustering column, or if you want to edit the static row. Note that as a
shortcut it is also allowed to pass a Clustering
object directly, in which case that should be the
only argument.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)
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.existing
and those in existing
.public static Row removeShadowedCells(Row existing, Row update, DeletionTime rangeDeletion)
merge(result, update, nowInSec) == merge(existing, update, nowInSec)
after filtering by rangeDeletion.existing
- source rowupdate
- shadowing rowrangeDeletion
- extra DeletionTime
from covering tombstoneCopyright © 2009-2021 The Apache Software Foundation