Class RowIteratorMergeListener<E extends Endpoints<E>>
java.lang.Object
org.apache.cassandra.service.reads.repair.RowIteratorMergeListener<E>
- All Implemented Interfaces:
UnfilteredRowIterators.MergeListener
public class RowIteratorMergeListener<E extends Endpoints<E>>
extends Object
implements UnfilteredRowIterators.MergeListener
-
Field Summary
Fields inherited from interface org.apache.cassandra.db.rows.UnfilteredRowIterators.MergeListener
NOOP -
Constructor Summary
ConstructorsConstructorDescriptionRowIteratorMergeListener(DecoratedKey partitionKey, RegularAndStaticColumns columns, boolean isReversed, ReplicaPlan.ForRead<E, ?> readPlan, ReadCommand command, ReadRepair<E, ?> readRepair) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidonMergedPartitionLevelDeletion(DeletionTime mergedDeletion, DeletionTime[] versions) Called once for the merged partition.voidonMergedRangeTombstoneMarkers(RangeTombstoneMarker merged, RangeTombstoneMarker[] versions) Called once for every range tombstone marker participating in the merge.voidonMergedRows(Row merged, Row[] versions) Called once for every row participating in the merge.
-
Constructor Details
-
RowIteratorMergeListener
public RowIteratorMergeListener(DecoratedKey partitionKey, RegularAndStaticColumns columns, boolean isReversed, ReplicaPlan.ForRead<E, ?> readPlan, ReadCommand command, ReadRepair<E, ?> readRepair)
-
-
Method Details
-
onMergedPartitionLevelDeletion
Description copied from interface:UnfilteredRowIterators.MergeListenerCalled once for the merged partition.- Specified by:
onMergedPartitionLevelDeletionin interfaceUnfilteredRowIterators.MergeListener- Parameters:
mergedDeletion- the partition level deletion for the merged partition. Implementors can test if the merged partition actually has a partition level deletion or not by callingmergedDeletion.isLive().versions- the partition level deletion for the sources of the merge. Elements of the array will never be null, but be "live".
-
onMergedRows
Description copied from interface:UnfilteredRowIterators.MergeListenerCalled once for every row participating in the merge.Note that this is called for every clustering where at least one of the source merged has a row. In particular, this may be called in cases where there is no row in the merged output (if a source has a row that is shadowed by another source range tombstone or partition level deletion).
- Specified by:
onMergedRowsin interfaceUnfilteredRowIterators.MergeListener- Parameters:
merged- the result of the merge. This cannot benull(so that listener can always access the clustering from this safely) but can be empty, in which case this is a placeholder for when at least one source has a row, but that row is shadowed in the merged output.versions- for each source, the row in that source corresponding tomerged. This can benullfor some sources if the source has not such row.
-
onMergedRangeTombstoneMarkers
public void onMergedRangeTombstoneMarkers(RangeTombstoneMarker merged, RangeTombstoneMarker[] versions) Description copied from interface:UnfilteredRowIterators.MergeListenerCalled once for every range tombstone marker participating in the merge.Note that this is called for every "clustering position" where at least one of the source merged has a range tombstone marker.
- Specified by:
onMergedRangeTombstoneMarkersin interfaceUnfilteredRowIterators.MergeListener- Parameters:
merged- the marker in the merged output. This can benullif there is no such marker, which means that at least one source has a marker inversionsbut the merged out has nothing corresponding (this basically mean the merged output has a currently open deletion that shadows whatever marker the source had).versions- the marker for each source merged. This can benullfor some source if that source has not such marker.
-
close
public void close()- Specified by:
closein interfaceUnfilteredRowIterators.MergeListener
-