Examples of seek()


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

    SortedKeyValueIterator<Key,Value> source = createIteratorStack(NUM_ROWS, NUM_DOCIDS, columnFamilies, otherColumnFamilies, docs);
    Map<String,String> options = new HashMap<String,String>();
    options.put(FamilyIntersectingIterator.columnFamiliesOptionName, FamilyIntersectingIterator.encodeColumns(columnFamilies));
    FamilyIntersectingIterator iter = new FamilyIntersectingIterator();
    iter.init(source, options, env);
    iter.seek(new Range(), EMPTY_COL_FAMS, false);
    int hitCount = 0;
    while (iter.hasTop()) {
      hitCount++;
      Key k = iter.getTopKey();
      // System.out.println(k.toString());
View Full Code Here

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

    assertTrue("size = " + size, size == 100);
   
    Filter fi = new SimpleFilter();
    fi.init(new SortedMapIterator(tm), EMPTY_OPTS, null);
    Key k = new Key(new Text("500"));
    fi.seek(new Range(k, null), EMPTY_COL_FAMS, false);
    size = size(fi);
    assertTrue("size = " + size, size == 50);
   
    filter1 = new SimpleFilter();
    filter1.init(new SortedMapIterator(tm), EMPTY_OPTS, null);
View Full Code Here

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

    assertTrue("size = " + size, size == 100);
   
    try {
      FilteringIterator fi = new FilteringIterator(new SortedMapIterator(tm), f);
      Key k = new Key(new Text("500"));
      fi.seek(new Range(k, null), EMPTY_COL_FAMS, false);
      TreeMap<Key,Value> tmOut = new TreeMap<Key,Value>();
      while (fi.hasTop()) {
        tmOut.put(fi.getTopKey(), fi.getTopValue());
        fi.next();
      }
View Full Code Here

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

        Configuration newConf = new Configuration(conf);
        newConf.setInt("io.seqfile.compress.blocksize", 100000);
       
        MyMapFile.Writer out = new MyMapFile.Writer(newConf, fs, tmpFile, MemKey.class, Value.class, MySequenceFile.CompressionType.BLOCK);
        InterruptibleIterator iter = map.skvIterator();
        iter.seek(new Range(), LocalityGroupUtil.EMPTY_CF_SET, false);
       
        while (iter.hasTop() && activeIters.size() > 0) {
          out.append(iter.getTopKey(), iter.getTopValue());
          iter.next();
        }
View Full Code Here

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

    SortedKeyValueIterator<Key,Value> source = createIteratorStack(NUM_ROWS, NUM_DOCIDS, columnFamilies, otherColumnFamilies, docs);
    Map<String,String> options = new HashMap<String,String>();
    options.put(IntersectingIterator.columnFamiliesOptionName, IntersectingIterator.encodeColumns(columnFamilies));
    IntersectingIterator iter = new IntersectingIterator();
    iter.init(source, options, env);
    iter.seek(new Range(), EMPTY_COL_FAMS, false);
    int hitCount = 0;
    while (iter.hasTop()) {
      hitCount++;
      Key k = iter.getTopKey();
      assertTrue(docs.contains(k.getColumnQualifier()));
View Full Code Here

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

    for (int i = 1; i <= 20; i++) {
      TreeMap<Key,Value> expectedData = new TreeMap<Key,Value>();
      genTestData(expectedData, i);
     
      LargeRowFilter lrfi = setupIterator(testData, i, IteratorScope.scan);
      lrfi.seek(new Range(), LocalityGroupUtil.EMPTY_CF_SET, false);
     
      TreeMap<Key,Value> filteredData = new TreeMap<Key,Value>();
     
      while (lrfi.hasTop()) {
        filteredData.put(lrfi.getTopKey(), lrfi.getTopValue());
View Full Code Here

Examples of org.apache.accumulo.core.iterators.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.RowDeletingIterator.seek()

    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");
View Full Code Here

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

        System.out.println("Scanning after " + startRow);
      } else {
        System.out.println("Scanning from " + startRow);
      }
      Key startKey = new Key(new Text(String.format("row_%06d", startRow)), columnf, columnq, Long.MAX_VALUE);
      sc.seek(new Range(startKey, null), LocalityGroupUtil.EMPTY_CF_SET, false);
      for (int j = 0; j < 20000; j++) {
        // scan through the cache
        if (!sc.hasTop()) {
          System.out.println("end of cache reached with key=" + startKey + " and j=" + j);
          break;
View Full Code Here

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

  public void valueIteratorTest() throws IOException {
    TreeMap<Key,Value> tm = new TreeMap<Key,Value>();
    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());
  }
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.