use of org.apache.accumulo.core.iterators.Combiner.ValueIterator in project accumulo by apache.
the class CombinerTest method valueIteratorTest.
@Test
public void valueIteratorTest() throws IOException {
TreeMap<Key, Value> tm = new TreeMap<>();
tm.put(new Key("r", "f", "q", 1), new Value("1".getBytes()));
tm.put(new Key("r", "f", "q", 2), new Value("2".getBytes()));
SortedMapIterator smi = new SortedMapIterator(tm);
smi.seek(new Range(), EMPTY_COL_FAMS, false);
ValueIterator iter = new ValueIterator(smi);
assertEquals(iter.next().toString(), "2");
assertEquals(iter.next().toString(), "1");
assertFalse(iter.hasNext());
}
Aggregations