Examples of seek()


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

   
    SortedMapIterator smi = new SortedMapIterator(tm1);
    TestDataSource tds = new TestDataSource(smi);
    SourceSwitchingIterator ssi = new SourceSwitchingIterator(tds);
   
    ssi.seek(new Range(), new ArrayList<ByteSequence>(), false);
    ane(ssi, "r1", "cf1", "cq1", 5, "v1", true);
    ane(ssi, "r1", "cf1", "cq3", 5, "v2", true);
    ane(ssi, "r2", "cf1", "cq1", 5, "v3", true);
    assertFalse(ssi.hasTop());
  }
View Full Code Here

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

      throws IOException {
    MultiIterator multiIterator = new MultiIterator(readers, false);
    DeletingIterator delIter = new DeletingIterator(multiIterator, false);
    SystemScanIterator ssi = new SystemScanIterator(delIter, Constants.NO_AUTHS, new byte[0], columns);
   
    ssi.seek(r, LocalityGroupUtil.EMPTY_CF_SET, false);
   
    VersioningIterator vi = new VersioningIterator();
    Map<String,String> opts = new HashMap<String,String>();
    opts.put("maxVersions", "1");
    vi.init(ssi, opts, null);
View Full Code Here

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

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

      }
    }
    SortedMapIterator source = new SortedMapIterator(map);
    WholeRowIterator iter = new WholeRowIterator(source);
    SortedMap<Key,Value> resultMap = new TreeMap<Key,Value>();
    iter.seek(new Range(), new ArrayList<ByteSequence>(), false);
    int numRows = 0;
    while (iter.hasTop()) {
      numRows++;
      Key rowKey = iter.getTopKey();
      Value rowValue = iter.getTopValue();
View Full Code Here

Examples of org.apache.accumulo.core.iterators.system.ColumnFamilySkippingIterator.seek()

   
    ArrayList<ByteSequence> columns = new ArrayList<ByteSequence>();
    columns.add(new ArrayByteSequence("bar"));
   
    // this seek resulted in an infinite loop before a bug was fixed
    cfsi.seek(new Range("r1"), columns, true);
   
    assertFalse(cfsi.hasTop());
   
    ski1.close();
  }
View Full Code Here

Examples of org.apache.accumulo.core.iterators.system.ColumnQualifierFilter.seek()

      tm.put(k, dv);
    }
    assertTrue(tm.size() == 1000);
   
    ColumnQualifierFilter a = new ColumnQualifierFilter(new SortedMapIterator(tm), hsc);
    a.seek(new Range(), EMPTY_COL_FAMS, false);
    assertEquals(size(a), 1000);
   
    hsc = new HashSet<Column>();
    hsc.add(new Column("a".getBytes(), "b".getBytes(), null));
    a = new ColumnQualifierFilter(new SortedMapIterator(tm), hsc);
View Full Code Here

Examples of org.apache.accumulo.core.iterators.system.DeletingIterator.seek()

    assertTrue("Initial size was " + tm.size(), tm.size() == 21);
   
    Text checkRow = new Text("000");
    try {
      DeletingIterator it = new DeletingIterator(new SortedMapIterator(tm), false);
      it.seek(new Range(), EMPTY_COL_FAMS, false);
     
      TreeMap<Key,Value> tmOut = new TreeMap<Key,Value>();
      while (it.hasTop()) {
        tmOut.put(it.getTopKey(), it.getTopValue());
        it.next();
View Full Code Here

Examples of org.apache.accumulo.core.iterators.system.InterruptibleIterator.seek()

        newConf.setInt("io.seqfile.compress.blocksize", 100000);
       
        FileSKVWriter out = new RFileOperations().openWriter(tmpFile, fs, newConf, ServerConfiguration.getSiteConfiguration());
        out.startDefaultLocalityGroup();
        InterruptibleIterator iter = map.skvIterator();
        iter.seek(new Range(), LocalityGroupUtil.EMPTY_CF_SET, false);
       
        while (iter.hasTop() && activeIters.size() > 0) {
          // RFile does not support MemKey, so we move the kv count into the value only for the RFile.
          // There is no need to change the MemKey to a normal key because the kvCount info gets lost when it is written
          Value newValue = new MemValue(iter.getTopValue(), ((MemKey) iter.getTopKey()).kvCount);
View Full Code Here

Examples of org.apache.accumulo.core.iterators.system.MultiIterator.seek()

    for (int i = 0; i < readers.length; i++) {
      iters.add(readers[i]);
    }
   
    MultiIterator mmfi = new MultiIterator(iters, new KeyExtent(new Text(""), null, null));
    mmfi.seek(new Range(new Key(), null), LocalityGroupUtil.EMPTY_CF_SET, false);
   
    long t1 = System.currentTimeMillis();
    int count = 0;
    int misses = 0;
    for (Key key : queries) {
View Full Code Here

Examples of org.apache.accumulo.core.iterators.system.SourceSwitchingIterator.seek()

   
    SortedMapIterator smi = new SortedMapIterator(tm1);
    TestDataSource tds = new TestDataSource(smi);
    SourceSwitchingIterator ssi = new SourceSwitchingIterator(tds);
   
    ssi.seek(new Range(), new ArrayList<ByteSequence>(), false);
    ane(ssi, "r1", "cf1", "cq1", 5, "v1", true);
    ane(ssi, "r1", "cf1", "cq3", 5, "v2", true);
    ane(ssi, "r2", "cf1", "cq1", 5, "v3", true);
    assertFalse(ssi.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.