@Override public void applyToPartition(DecoratedKey partitionKey, Row staticRow) { if (partitionKey.getKey().equals(lastReturnedKey)) { rowInCurrentPartition = perPartitionLimit - lastReturnedKeyRemaining; // lastReturnedKey is the last key for which we're returned rows in the first page. // So, since we know we have returned rows, we know we have accounted for the static row // if any already, so force hasLiveStaticRow to false so we make sure to not count it // once more. hasLiveStaticRow = false; } else { super.applyToPartition(partitionKey, staticRow); } } }
@Override public void applyToPartition(DecoratedKey partitionKey, Row staticRow) { if (partitionKey.getKey().equals(lastReturnedKey)) { rowInCurrentPartition = perPartitionLimit - lastReturnedKeyRemaining; // lastReturnedKey is the last key for which we're returned rows in the first page. // So, since we know we have returned rows, we know we have accounted for the static row // if any already, so force hasLiveStaticRow to false so we make sure to not count it // once more. hasLiveStaticRow = false; } else { super.applyToPartition(partitionKey, staticRow); } } }
@Override public void applyToPartition(DecoratedKey partitionKey, Row staticRow) { if (partitionKey.getKey().equals(lastReturnedKey)) { rowInCurrentPartition = perPartitionLimit - lastReturnedKeyRemaining; // lastReturnedKey is the last key for which we're returned rows in the first page. // So, since we know we have returned rows, we know we have accounted for the static row // if any already, so force hasLiveStaticRow to false so we make sure to not count it // once more. hasLiveStaticRow = false; } else { super.applyToPartition(partitionKey, staticRow); } } }
@Override public void applyToPartition(DecoratedKey partitionKey, Row staticRow) { rowInCurrentPartition = 0; hasLiveStaticRow = !staticRow.isEmpty() && isLive(staticRow); }
public boolean isDoneForPartition() { return isDone() || rowInCurrentPartition >= perPartitionLimit; } }
@Override public void onPartitionClose() { // Normally, we don't count static rows as from a CQL point of view, it will be merge with other // rows in the partition. However, if we only have the static row, it will be returned as one row // so count it. if (countPartitionsWithOnlyStaticData && hasLiveStaticRow && rowInCurrentPartition == 0) incrementRowCount(); super.onPartitionClose(); }
public Counter newCounter(int nowInSec, boolean assumeLiveData, boolean countPartitionsWithOnlyStaticData, boolean enforceStrictLiveness) { return new CQLCounter(nowInSec, assumeLiveData, countPartitionsWithOnlyStaticData, enforceStrictLiveness); }
@Override public Row applyToRow(Row row) { if (isLive(row)) incrementRowCount(); return row; }
protected void incrementRowCount() { if (++rowCounted >= rowLimit) stop(); if (++rowInCurrentPartition >= perPartitionLimit) stopInPartition(); }
@Override public void applyToPartition(DecoratedKey partitionKey, Row staticRow) { rowInCurrentPartition = 0; hasLiveStaticRow = !staticRow.isEmpty() && isLive(staticRow); }
public Counter newCounter(int nowInSec, boolean assumeLiveData, boolean countPartitionsWithOnlyStaticData, boolean enforceStrictLiveness) { return new CQLCounter(nowInSec, assumeLiveData, countPartitionsWithOnlyStaticData, enforceStrictLiveness); }
@Override public void onPartitionClose() { // Normally, we don't count static rows as from a CQL point of view, it will be merge with other // rows in the partition. However, if we only have the static row, it will be returned as one row // so count it. if (countPartitionsWithOnlyStaticData && hasLiveStaticRow && rowInCurrentPartition == 0) incrementRowCount(); super.onPartitionClose(); }
protected void incrementRowCount() { if (++rowCounted >= rowLimit) stop(); if (++rowInCurrentPartition >= perPartitionLimit) stopInPartition(); }
public boolean isDoneForPartition() { return isDone() || rowInCurrentPartition >= perPartitionLimit; } }
public boolean isDoneForPartition() { return isDone() || rowInCurrentPartition >= perPartitionLimit; } }
@Override public void onPartitionClose() { // Normally, we don't count static rows as from a CQL point of view, it will be merge with other // rows in the partition. However, if we only have the static row, it will be returned as one row // so count it. if (countPartitionsWithOnlyStaticData && hasLiveStaticRow && rowInCurrentPartition == 0) incrementRowCount(); super.onPartitionClose(); }
@Override public void applyToPartition(DecoratedKey partitionKey, Row staticRow) { rowInCurrentPartition = 0; hasLiveStaticRow = !staticRow.isEmpty() && isLive(staticRow); }
public Counter newCounter(int nowInSec, boolean assumeLiveData, boolean countPartitionsWithOnlyStaticData, boolean enforceStrictLiveness) { return new CQLCounter(nowInSec, assumeLiveData, countPartitionsWithOnlyStaticData, enforceStrictLiveness); }
protected void incrementRowCount() { if (++rowCounted >= rowLimit) stop(); if (++rowInCurrentPartition >= perPartitionLimit) stopInPartition(); }
@Override public Row applyToRow(Row row) { if (isLive(row)) incrementRowCount(); return row; }