Package org.apache.accumulo.core.iterators

Examples of org.apache.accumulo.core.iterators.RowDeletingIterator


    put(tm1, "r1", "", "", 10, RowDeletingIterator.DELETE_ROW_VALUE);
    put(tm1, "r1", "cf1", "cq1", 5, "v1");
    put(tm1, "r1", "cf1", "cq3", 5, "v1");
    put(tm1, "r2", "cf1", "cq1", 5, "v1");
   
    RowDeletingIterator rdi = new RowDeletingIterator();
    rdi.init(new SortedMapIterator(tm1), null, new TestIE(IteratorScope.scan, false));
   
    rdi.seek(new Range(), new ArrayList<ByteSequence>(), false);
    ane(rdi, "r2", "cf1", "cq1", 5, "v1");
   
    for (int i = 0; i < 5; i++) {
      rdi.seek(new Range(nk("r1", "cf1", "cq" + i, 5), null), new ArrayList<ByteSequence>(), false);
      ane(rdi, "r2", "cf1", "cq1", 5, "v1");
    }
   
    rdi.seek(new Range(nk("r11", "cf1", "cq1", 5), null), new ArrayList<ByteSequence>(), false);
    ane(rdi, "r2", "cf1", "cq1", 5, "v1");
   
    put(tm1, "r2", "", "", 10, RowDeletingIterator.DELETE_ROW_VALUE);
    rdi.seek(new Range(), new ArrayList<ByteSequence>(), false);
    assertFalse(rdi.hasTop());
   
    for (int i = 0; i < 5; i++) {
      rdi.seek(new Range(nk("r1", "cf1", "cq" + i, 5), null), new ArrayList<ByteSequence>(), false);
      assertFalse(rdi.hasTop());
    }
   
    put(tm1, "r0", "cf1", "cq1", 5, "v1");
    rdi.seek(new Range(), new ArrayList<ByteSequence>(), false);
    ane(rdi, "r0", "cf1", "cq1", 5, "v1");
    rdi.next();
    assertFalse(rdi.hasTop());
   
  }
View Full Code Here


    put(tm1, "r1", "cf1", "cq3", 15, "v1");
    put(tm1, "r1", "cf1", "cq4", 5, "v1");
    put(tm1, "r1", "cf1", "cq5", 15, "v1");
    put(tm1, "r2", "cf1", "cq1", 5, "v1");
   
    RowDeletingIterator rdi = new RowDeletingIterator();
    rdi.init(new SortedMapIterator(tm1), null, new TestIE(IteratorScope.scan, false));
   
    rdi.seek(new Range(), new ArrayList<ByteSequence>(), false);
    ane(rdi, "r1", "cf1", "cq3", 15, "v1");
    rdi.next();
    ane(rdi, "r1", "cf1", "cq5", 15, "v1");
    rdi.next();
    ane(rdi, "r2", "cf1", "cq1", 5, "v1");
   
    rdi.seek(new Range(nk("r1", "cf1", "cq1", 5), null), new ArrayList<ByteSequence>(), false);
    ane(rdi, "r1", "cf1", "cq3", 15, "v1");
    rdi.next();
    ane(rdi, "r1", "cf1", "cq5", 15, "v1");
    rdi.next();
    ane(rdi, "r2", "cf1", "cq1", 5, "v1");
   
    rdi.seek(new Range(nk("r1", "cf1", "cq4", 5), null), new ArrayList<ByteSequence>(), false);
    ane(rdi, "r1", "cf1", "cq5", 15, "v1");
    rdi.next();
    ane(rdi, "r2", "cf1", "cq1", 5, "v1");
   
    rdi.seek(new Range(nk("r1", "cf1", "cq5", 20), null), new ArrayList<ByteSequence>(), false);
    ane(rdi, "r1", "cf1", "cq5", 15, "v1");
    rdi.next();
    ane(rdi, "r2", "cf1", "cq1", 5, "v1");
   
    rdi.seek(new Range(nk("r1", "cf1", "cq9", 20), null), new ArrayList<ByteSequence>(), false);
    ane(rdi, "r2", "cf1", "cq1", 5, "v1");
  }
View Full Code Here

    put(tm1, "r1", "", "cq1", 5, "v1");
    put(tm1, "r1", "cf1", "cq1", 5, "v1");
    put(tm1, "r2", "", "cq1", 5, "v1");
    put(tm1, "r2", "cf1", "cq1", 5, "v1");
   
    RowDeletingIterator rdi = new RowDeletingIterator();
    rdi.init(new ColumnFamilySkippingIterator(new SortedMapIterator(tm1)), null, new TestIE(IteratorScope.scan, false));
   
    HashSet<ByteSequence> cols = new HashSet<ByteSequence>();
    cols.add(new ArrayByteSequence("cf1".getBytes()));
   
    rdi.seek(new Range(), cols, true);
    ane(rdi, "r2", "cf1", "cq1", 5, "v1");
   
    cols.clear();
    cols.add(new ArrayByteSequence("".getBytes()));
    rdi.seek(new Range(), cols, false);
    ane(rdi, "r2", "cf1", "cq1", 5, "v1");
   
    cols.clear();
    rdi.seek(new Range(), cols, false);
    ane(rdi, "r2", "", "cq1", 5, "v1");
    rdi.next();
    ane(rdi, "r2", "cf1", "cq1", 5, "v1");
  }
View Full Code Here

    put(tm1, "r1", "cf1", "cq1", 5, "v1");
    put(tm1, "r1", "cf1", "cq3", 15, "v1");
    put(tm1, "r1", "cf1", "cq4", 5, "v1");
    put(tm1, "r2", "cf1", "cq1", 5, "v1");
   
    RowDeletingIterator rdi = new RowDeletingIterator();
    rdi.init(new SortedMapIterator(tm1), null, new TestIE(IteratorScope.minc, false));
   
    rdi.seek(new Range(), new ArrayList<ByteSequence>(), false);
    ane(rdi, "r1", "", "", 10, RowDeletingIterator.DELETE_ROW_VALUE.toString());
    rdi.next();
    ane(rdi, "r1", "cf1", "cq3", 15, "v1");
    rdi.next();
    ane(rdi, "r2", "cf1", "cq1", 5, "v1");
   
    rdi.seek(new Range(nk("r1", "cf1", "cq3", 20), null), new ArrayList<ByteSequence>(), false);
    ane(rdi, "r1", "cf1", "cq3", 15, "v1");
    rdi.next();
    ane(rdi, "r2", "cf1", "cq1", 5, "v1");
   
    rdi.seek(new Range(nk("r1", "", "", 42), null), new ArrayList<ByteSequence>(), false);
    ane(rdi, "r1", "", "", 10, RowDeletingIterator.DELETE_ROW_VALUE.toString());
    rdi.next();
    ane(rdi, "r1", "cf1", "cq3", 15, "v1");
    rdi.next();
    ane(rdi, "r2", "cf1", "cq1", 5, "v1");
   
  }
View Full Code Here

TOP

Related Classes of org.apache.accumulo.core.iterators.RowDeletingIterator

Copyright © 2018 www.massapicom. 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.