use of org.apache.accumulo.tserver.tablet.CountingIterator in project accumulo by apache.
the class CountingIteratorTest method testDeepCopyCount.
@Test
public void testDeepCopyCount() throws IOException {
TreeMap<Key, Value> tm = new TreeMap<>();
tm.put(new Key("r1", "cf1", "cq1"), new Value("data1".getBytes()));
tm.put(new Key("r2", "cf1", "cq1"), new Value("data2".getBytes()));
SortedMapIterator smi = new SortedMapIterator(tm);
CountingIterator ci = new CountingIterator(smi, new AtomicLong(0));
CountingIterator dc1 = ci.deepCopy(null);
CountingIterator dc2 = ci.deepCopy(null);
readAll(ci);
readAll(dc1);
readAll(dc2);
Assert.assertEquals(6, ci.getCount());
}
Aggregations