Package org.apache.accumulo.core.iterators

Examples of org.apache.accumulo.core.iterators.AggregatingIterator.seek()


   
    ai.init(new SortedMapIterator(tm1), opts, new DefaultIteratorEnvironment());
   
    // try seeking to the beginning of a key that aggregates
   
    ai.seek(nr(1, 1, 1, 3, false), EMPTY_COL_FAMS, false);
   
    assertFalse(ai.hasTop());
   
  }
 
View Full Code Here


   
    opts.put("cf001", SummationAggregator.class.getName());
   
    ai.init(new SortedMapIterator(tm1), opts, new DefaultIteratorEnvironment());
   
    ai.seek(nr(1, 1, 1, 4, true), EMPTY_COL_FAMS, false);
   
    assertTrue(ai.hasTop());
    assertEquals(nk(1, 1, 1, 4), ai.getTopKey());
    assertEquals("7", ai.getTopValue().toString());
   
View Full Code Here

    tm1 = new TreeMap<Key,Value>();
    nkv(tm1, 1, 1, 1, 2, true, "");
    ai = new AggregatingIterator();
    ai.init(new SortedMapIterator(tm1), opts, new DefaultIteratorEnvironment());
   
    ai.seek(nr(1, 1, 1, 4, true), EMPTY_COL_FAMS, false);
   
    assertTrue(ai.hasTop());
    assertEquals(nk(1, 1, 1, 2, true), ai.getTopKey());
    assertEquals("", ai.getTopValue().toString());
   
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.