public Row markCounterLocalToBeCleared() { return transformAndFilter(primaryKeyLivenessInfo, deletion, (cd) -> cd.column().isCounterColumn() ? cd.markCounterLocalToBeCleared() : cd); }
public Row markCounterLocalToBeCleared() { return transformAndFilter(primaryKeyLivenessInfo, deletion, (cd) -> cd.column().isCounterColumn() ? cd.markCounterLocalToBeCleared() : cd); }
public Row markCounterLocalToBeCleared() { return transformAndFilter(primaryKeyLivenessInfo, deletion, (cd) -> cd.column().isCounterColumn() ? cd.markCounterLocalToBeCleared() : cd); }
public Row markCounterLocalToBeCleared() { return transformAndFilter(primaryKeyLivenessInfo, deletion, (cd) -> cd.column().cellValueType().isCounter() ? cd.markCounterLocalToBeCleared() : cd); }
public Row withOnlyQueriedData(ColumnFilter filter) { if (filter.allFetchedColumnsAreQueried()) return this; return transformAndFilter(primaryKeyLivenessInfo, deletion, (cd) -> { ColumnDefinition column = cd.column(); if (column.isComplex()) return ((ComplexColumnData)cd).withOnlyQueriedData(filter); return filter.fetchedColumnIsQueried(column) ? cd : null; }); }
public Row withOnlyQueriedData(ColumnFilter filter) { if (filter.allFetchedColumnsAreQueried()) return this; return transformAndFilter(primaryKeyLivenessInfo, deletion, (cd) -> { ColumnDefinition column = cd.column(); if (column.isComplex()) return ((ComplexColumnData)cd).withOnlyQueriedData(filter); return filter.fetchedColumnIsQueried(column) ? cd : null; }); }
public Row withOnlyQueriedData(ColumnFilter filter) { if (filter.allFetchedColumnsAreQueried()) return this; return transformAndFilter(primaryKeyLivenessInfo, deletion, (cd) -> { ColumnDefinition column = cd.column(); if (column.isComplex()) return ((ComplexColumnData)cd).withOnlyQueriedData(filter); return filter.fetchedColumnIsQueried(column) ? cd : null; }); }
public Row withOnlyQueriedData(ColumnFilter filter) { if (filter.allFetchedColumnsAreQueried()) return this; return transformAndFilter(primaryKeyLivenessInfo, deletion, (cd) -> { ColumnDefinition column = cd.column(); if (column.isComplex()) return ((ComplexColumnData)cd).withOnlyQueriedData(filter); return filter.fetchedColumnIsQueried(column) ? cd : null; }); }
public Row purge(DeletionPurger purger, int nowInSec) { if (!hasDeletion(nowInSec)) return this; LivenessInfo newInfo = purger.shouldPurge(primaryKeyLivenessInfo, nowInSec) ? LivenessInfo.EMPTY : primaryKeyLivenessInfo; Deletion newDeletion = purger.shouldPurge(deletion.time()) ? Deletion.LIVE : deletion; return transformAndFilter(newInfo, newDeletion, (cd) -> cd.purge(purger, nowInSec)); }
public Row purge(DeletionPurger purger, int nowInSec, boolean enforceStrictLiveness) { if (!hasDeletion(nowInSec)) return this; LivenessInfo newInfo = purger.shouldPurge(primaryKeyLivenessInfo, nowInSec) ? LivenessInfo.EMPTY : primaryKeyLivenessInfo; Deletion newDeletion = purger.shouldPurge(deletion.time()) ? Deletion.LIVE : deletion; // when enforceStrictLiveness is set, a row is considered dead when it's PK liveness info is not present if (enforceStrictLiveness && newDeletion.isLive() && newInfo.isEmpty()) return null; return transformAndFilter(newInfo, newDeletion, (cd) -> cd.purge(purger, nowInSec)); }
public Row purge(DeletionPurger purger, int nowInSec, boolean enforceStrictLiveness) { if (!hasDeletion(nowInSec)) return this; LivenessInfo newInfo = purger.shouldPurge(primaryKeyLivenessInfo, nowInSec) ? LivenessInfo.EMPTY : primaryKeyLivenessInfo; Deletion newDeletion = purger.shouldPurge(deletion.time()) ? Deletion.LIVE : deletion; // when enforceStrictLiveness is set, a row is considered dead when it's PK liveness info is not present if (enforceStrictLiveness && newDeletion.isLive() && newInfo.isEmpty()) return null; return transformAndFilter(newInfo, newDeletion, (cd) -> cd.purge(purger, nowInSec)); }
public Row purge(DeletionPurger purger, int nowInSec, boolean enforceStrictLiveness) { if (!hasDeletion(nowInSec)) return this; LivenessInfo newInfo = purger.shouldPurge(primaryKeyLivenessInfo, nowInSec) ? LivenessInfo.EMPTY : primaryKeyLivenessInfo; Deletion newDeletion = purger.shouldPurge(deletion.time()) ? Deletion.LIVE : deletion; // when enforceStrictLiveness is set, a row is considered dead when it's PK liveness info is not present if (enforceStrictLiveness && newDeletion.isLive() && newInfo.isEmpty()) return null; return transformAndFilter(newInfo, newDeletion, (cd) -> cd.purge(purger, nowInSec)); }
/** * Returns a copy of the row where all timestamps for live data have replaced by {@code newTimestamp} and * all deletion timestamp by {@code newTimestamp - 1}. * * This exists for the Paxos path, see {@link PartitionUpdate#updateAllTimestamp} for additional details. */ public Row updateAllTimestamp(long newTimestamp) { LivenessInfo newInfo = primaryKeyLivenessInfo.isEmpty() ? primaryKeyLivenessInfo : primaryKeyLivenessInfo.withUpdatedTimestamp(newTimestamp); // If the deletion is shadowable and the row has a timestamp, we'll forced the deletion timestamp to be less than the row one, so we // should get rid of said deletion. Deletion newDeletion = deletion.isLive() || (deletion.isShadowable() && !primaryKeyLivenessInfo.isEmpty()) ? Deletion.LIVE : new Deletion(new DeletionTime(newTimestamp - 1, deletion.time().localDeletionTime()), deletion.isShadowable()); return transformAndFilter(newInfo, newDeletion, (cd) -> cd.updateAllTimestamp(newTimestamp)); }
Predicate<ColumnDefinition> queriedByUserTester = filter.queriedColumns().columns(isStatic()).inOrderInclusionTester(); final LivenessInfo rowLiveness = newInfo; return transformAndFilter(newInfo, newDeletion, (cd) -> {
Predicate<ColumnDefinition> queriedByUserTester = filter.queriedColumns().columns(isStatic()).inOrderInclusionTester(); final LivenessInfo rowLiveness = newInfo; return transformAndFilter(newInfo, newDeletion, (cd) -> {
/** * Returns a copy of the row where all timestamps for live data have replaced by {@code newTimestamp} and * all deletion timestamp by {@code newTimestamp - 1}. * * This exists for the Paxos path, see {@link PartitionUpdate#updateAllTimestamp} for additional details. */ public Row updateAllTimestamp(long newTimestamp) { LivenessInfo newInfo = primaryKeyLivenessInfo.isEmpty() ? primaryKeyLivenessInfo : primaryKeyLivenessInfo.withUpdatedTimestamp(newTimestamp); // If the deletion is shadowable and the row has a timestamp, we'll forced the deletion timestamp to be less than the row one, so we // should get rid of said deletion. Deletion newDeletion = deletion.isLive() || (deletion.isShadowable() && !primaryKeyLivenessInfo.isEmpty()) ? Deletion.LIVE : new Deletion(new DeletionTime(newTimestamp - 1, deletion.time().localDeletionTime()), deletion.isShadowable()); return transformAndFilter(newInfo, newDeletion, (cd) -> cd.updateAllTimestamp(newTimestamp)); }
Predicate<ColumnDefinition> queriedByUserTester = filter.queriedColumns().columns(isStatic()).inOrderInclusionTester(); final LivenessInfo rowLiveness = newInfo; return transformAndFilter(newInfo, newDeletion, (cd) -> {
Predicate<ColumnDefinition> queriedByUserTester = filter.queriedColumns().columns(isStatic()).inOrderInclusionTester(); final LivenessInfo rowLiveness = newInfo; return transformAndFilter(newInfo, newDeletion, (cd) -> {
/** * Returns a copy of the row where all timestamps for live data have replaced by {@code newTimestamp} and * all deletion timestamp by {@code newTimestamp - 1}. * * This exists for the Paxos path, see {@link PartitionUpdate#updateAllTimestamp} for additional details. */ public Row updateAllTimestamp(long newTimestamp) { LivenessInfo newInfo = primaryKeyLivenessInfo.isEmpty() ? primaryKeyLivenessInfo : primaryKeyLivenessInfo.withUpdatedTimestamp(newTimestamp); // If the deletion is shadowable and the row has a timestamp, we'll forced the deletion timestamp to be less than the row one, so we // should get rid of said deletion. Deletion newDeletion = deletion.isLive() || (deletion.isShadowable() && !primaryKeyLivenessInfo.isEmpty()) ? Deletion.LIVE : new Deletion(new DeletionTime(newTimestamp - 1, deletion.time().localDeletionTime()), deletion.isShadowable()); return transformAndFilter(newInfo, newDeletion, (cd) -> cd.updateAllTimestamp(newTimestamp)); }
/** * Returns a copy of the row where all timestamps for live data have replaced by {@code newTimestamp} and * all deletion timestamp by {@code newTimestamp - 1}. * * This exists for the Paxos path, see {@link PartitionUpdate#updateAllTimestamp} for additional details. */ public Row updateAllTimestamp(long newTimestamp) { LivenessInfo newInfo = primaryKeyLivenessInfo.isEmpty() ? primaryKeyLivenessInfo : primaryKeyLivenessInfo.withUpdatedTimestamp(newTimestamp); // If the deletion is shadowable and the row has a timestamp, we'll forced the deletion timestamp to be less than the row one, so we // should get rid of said deletion. Deletion newDeletion = deletion.isLive() || (deletion.isShadowable() && !primaryKeyLivenessInfo.isEmpty()) ? Deletion.LIVE : new Deletion(new DeletionTime(newTimestamp - 1, deletion.time().localDeletionTime()), deletion.isShadowable()); return transformAndFilter(newInfo, newDeletion, (cd) -> cd.updateAllTimestamp(newTimestamp)); }