use of herddb.index.brin.BlockRangeIndex.Block in project herddb by diennea.
the class BlockRangeIndexConcurrentTest method verifyIndex.
private void verifyIndex(BlockRangeIndex<Sized<Integer>, Sized<String>> index) {
Integer lastmax = null;
for (Block b : index.getBlocks().values()) {
System.out.println("check block " + lastmax + " -> " + ((Sized<Integer>) b.minKey).dummy + "," + ((Sized<Integer>) b.maxKey).dummy);
if (lastmax == null) {
lastmax = ((Sized<Integer>) b.maxKey).dummy;
} else {
Integer entryMin = ((Sized<Integer>) b.minKey).dummy;
Integer entryMax = ((Sized<Integer>) b.maxKey).dummy;
if (entryMin < lastmax) {
fail(entryMin + " < " + lastmax);
}
lastmax = entryMax;
}
}
}