Package org.apache.accumulo.core.iterators

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


    try {
      VersioningIterator it = new VersioningIterator(new SortedMapIterator(tm), 3);
     
      // after doing this seek, should get zero keys for row 1
      Key seekKey = new Key(new Text(String.format("%03d", 1)), colf, colq, 15);
      it.seek(new Range(seekKey, null), EMPTY_COL_FAMS, false);
     
      TreeMap<Key,Value> tmOut = iteratorOverTestData(it);
     
      for (Entry<Key,Value> e : tmOut.entrySet()) {
        assertTrue(e.getValue().get().length == 8);
View Full Code Here


     
      assertTrue("size after seeking past versions was " + tmOut.size(), tmOut.size() == 0);
     
      // after doing this seek, should get zero keys for row 0 and 3 keys for row 1
      seekKey = new Key(new Text(String.format("%03d", 0)), colf, colq, 15);
      it.seek(new Range(seekKey, null), EMPTY_COL_FAMS, false);
     
      tmOut = iteratorOverTestData(it);
     
      for (Entry<Key,Value> e : tmOut.entrySet()) {
        assertTrue(e.getValue().get().length == 8);
View Full Code Here

    createTestData(tm, colf, colq);
   
    VersioningIterator it = new VersioningIterator(new SortedMapIterator(tm), 3);
   
    Key seekKey = new Key(new Text(String.format("%03d", 1)), colf, colq, 19);
    it.seek(new Range(seekKey, false, null, true), EMPTY_COL_FAMS, false);
   
    assertTrue(it.hasTop());
    assertTrue(it.getTopKey().getTimestamp() == 18);
   
  }
View Full Code Here

     
      // after doing this seek, should only get two keys for row 1
      // since we are seeking to the middle of the most recent
      // three keys
      Key seekKey = new Key(new Text(String.format("%03d", 1)), colf, colq, 18);
      it.seek(new Range(seekKey, null), EMPTY_COL_FAMS, false);
     
      TreeMap<Key,Value> tmOut = iteratorOverTestData(it);
     
      for (Entry<Key,Value> e : tmOut.entrySet()) {
        assertTrue(e.getValue().get().length == 8);
View Full Code Here

    }
   
    MultiIterator multiIter = new MultiIterator(tabletIters, ke);
    DeletingIterator delIter = new DeletingIterator(multiIter, false);
    VersioningIterator tabletIter = new VersioningIterator(delIter, 1);
    tabletIter.seek(new Range(), LocalityGroupUtil.EMPTY_CF_SET, false);
   
    TreeMap<Key,Value> tm = new TreeMap<Key,Value>();
   
    while (tabletIter.hasTop()) {
     
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.