use of org.apache.cassandra.db.rows.AbstractRow in project cassandra by apache.
the class RepairedDataTombstonesTest method verify2.
private void verify2(int key, int expectedRows, int minVal, int maxVal, boolean includePurgeable) {
ReadCommand cmd = Util.cmd(getCurrentColumnFamilyStore(), Util.dk(ByteBufferUtil.bytes(key))).build();
int foundRows = 0;
try (ReadExecutionController executionController = cmd.executionController();
UnfilteredPartitionIterator iterator = includePurgeable ? cmd.queryStorage(getCurrentColumnFamilyStore(), executionController) : cmd.executeLocally(executionController)) {
while (iterator.hasNext()) {
try (UnfilteredRowIterator rowIter = iterator.next()) {
while (rowIter.hasNext()) {
AbstractRow row = (AbstractRow) rowIter.next();
for (int i = 0; i < row.clustering().size(); i++) {
foundRows++;
int val = ByteBufferUtil.toInt(row.clustering().get(i));
assertTrue("val=" + val, val >= minVal && val < maxVal);
}
}
}
}
}
assertEquals(expectedRows, foundRows);
}
use of org.apache.cassandra.db.rows.AbstractRow in project cassandra by apache.
the class RepairedDataTombstonesTest method verify.
private void verify(int expectedRows, int minVal, int maxVal, boolean includePurgeable) {
ReadCommand cmd = Util.cmd(getCurrentColumnFamilyStore()).build();
int foundRows = 0;
try (ReadExecutionController executionController = cmd.executionController();
UnfilteredPartitionIterator iterator = includePurgeable ? cmd.queryStorage(getCurrentColumnFamilyStore(), executionController) : cmd.executeLocally(executionController)) {
while (iterator.hasNext()) {
try (UnfilteredRowIterator rowIter = iterator.next()) {
if (// partition key 999 is 'live' and used to avoid sstables from being dropped
!rowIter.partitionKey().equals(Util.dk(ByteBufferUtil.bytes(999)))) {
while (rowIter.hasNext()) {
AbstractRow row = (AbstractRow) rowIter.next();
for (int i = 0; i < row.clustering().size(); i++) {
foundRows++;
int val = ByteBufferUtil.toInt(row.clustering().get(i));
assertTrue("val=" + val, val >= minVal && val < maxVal);
}
}
}
}
}
}
assertEquals(expectedRows, foundRows);
}
Aggregations