Package org.apache.accumulo.core.iterators

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


    ArrayList<FileSKVIterator> readers = new ArrayList<FileSKVIterator>(filesToCompact.size());
    Span span = Trace.start("compact");
    try {
      long entriesCompacted = 0;
      List<SortedKeyValueIterator<Key,Value>> iters = openMapDataFiles(lgName, conf, fs, filesToCompact, extent, readers);
      CountingIterator citr = new CountingIterator(new MultiIterator(iters, extent.toDataRange()));
      DeletingIterator delIter = new DeletingIterator(citr, propogateDeletes);
     
      IteratorEnvironment iterEnv = new TabletIteratorEnvironment(IteratorScope.majc, !propogateDeletes, acuTableConf);
     
      SortedKeyValueIterator<Key,Value> itr = IteratorUtil.loadIterators(IteratorScope.majc, delIter, extent, acuTableConf, iterEnv);
View Full Code Here


      iters.addAll(memIters);
     
      for (SortedKeyValueIterator<Key,Value> skvi : iters)
        ((InterruptibleIterator) skvi).setInterruptFlag(interruptFlag);
     
      MultiIterator multiIter = new MultiIterator(iters, extent);
     
      IteratorEnvironment iterEnv = new TabletIteratorEnvironment(IteratorScope.scan, acuTableConf, fileManager);
     
      DeletingIterator delIter = new DeletingIterator(multiIter, false);
     
View Full Code Here

    SortedKeyValueIterator<Key,Value> source = createIteratorStack(NUM_ROWS, NUM_DOCIDS, columnFamilies, otherColumnFamilies, docs);
    SortedKeyValueIterator<Key,Value> source2 = createIteratorStack(NUM_ROWS, NUM_DOCIDS, columnFamilies, otherColumnFamilies, docs);
    ArrayList<SortedKeyValueIterator<Key,Value>> sourceIters = new ArrayList<SortedKeyValueIterator<Key,Value>>();
    sourceIters.add(source);
    sourceIters.add(source2);
    MultiIterator mi = new MultiIterator(sourceIters, false);
    Map<String,String> options = new HashMap<String,String>();
    options.put(FamilyIntersectingIterator.columnFamiliesOptionName, FamilyIntersectingIterator.encodeColumns(columnFamilies));
    FamilyIntersectingIterator iter = new FamilyIntersectingIterator();
    iter.init(mi, options, env);
    iter.seek(new Range(), EMPTY_COL_FAMS, false);
View Full Code Here

    List<SortedKeyValueIterator<Key,Value>> iters = new ArrayList<SortedKeyValueIterator<Key,Value>>(mapfiles.size() + 1);
   
    iters.addAll(mapfiles);
    iters.add(new ColumnFamilySkippingIterator(smi));
   
    MultiIterator multiIter = new MultiIterator(iters, ke);
    DeletingIterator delIter = new DeletingIterator(multiIter, false);
   
    SystemScanIterator systemIter;
   
    systemIter = new SystemScanIterator(delIter, authorizations, defaultLabels, columnSet);
View Full Code Here

    return readers;
  }
 
  private SortedKeyValueIterator<Key,Value> createSystemIter(Range r, List<SortedKeyValueIterator<Key,Value>> readers, HashSet<Column> columns)
      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);
   
View Full Code Here

    List<SortedKeyValueIterator<Key,Value>> iters = new ArrayList<SortedKeyValueIterator<Key,Value>>(readers.length);
    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) {
      mmfi.seek(new Range(key, null), LocalityGroupUtil.EMPTY_CF_SET, false);
      if (mmfi.getTopKey().compareTo(key) != 0)
        misses++;
      count++;
    }
   
    long t2 = System.currentTimeMillis();
View Full Code Here

    SortedKeyValueIterator<Key,Value> source = createIteratorStack(NUM_ROWS, NUM_DOCIDS, columnFamilies, otherColumnFamilies, docs);
    SortedKeyValueIterator<Key,Value> source2 = createIteratorStack(NUM_ROWS, NUM_DOCIDS, columnFamilies, otherColumnFamilies, docs);
    ArrayList<SortedKeyValueIterator<Key,Value>> sourceIters = new ArrayList<SortedKeyValueIterator<Key,Value>>();
    sourceIters.add(source);
    sourceIters.add(source2);
    MultiIterator mi = new MultiIterator(sourceIters, false);
    Map<String,String> options = new HashMap<String,String>();
    options.put(IntersectingIterator.columnFamiliesOptionName, IntersectingIterator.encodeColumns(columnFamilies));
    IntersectingIterator iter = new IntersectingIterator();
    iter.init(mi, options, env);
    iter.seek(new Range(), EMPTY_COL_FAMS, false);
View Full Code Here

        System.out.println("Problem opening map file " + fileStatus.getPath().toString() + ", probably empty tmp file, skipping... ");
        continue;
      }
    }
   
    MultiIterator mi = new MultiIterator(inputs, true);
    DeletingIterator di = new DeletingIterator(mi, false);
   
    int count = 0, logCount = 0;
   
    while (di.hasTop()) {
View Full Code Here

    SortedKeyValueIterator<Key,Value> source = createIteratorStack(NUM_ROWS, NUM_DOCIDS, columnFamilies, otherColumnFamilies, docs);
    SortedKeyValueIterator<Key,Value> source2 = createIteratorStack(NUM_ROWS, NUM_DOCIDS, columnFamilies, otherColumnFamilies, docs);
    ArrayList<SortedKeyValueIterator<Key,Value>> sourceIters = new ArrayList<SortedKeyValueIterator<Key,Value>>();
    sourceIters.add(source);
    sourceIters.add(source2);
    MultiIterator mi = new MultiIterator(sourceIters, false);
    Map<String,String> options = new HashMap<String,String>();
    options.put(FamilyIntersectingIterator.columnFamiliesOptionName, FamilyIntersectingIterator.encodeColumns(columnFamilies));
    FamilyIntersectingIterator iter = new FamilyIntersectingIterator();
    iter.init(mi, options, env);
    iter.seek(new Range(), EMPTY_COL_FAMS, false);
View Full Code Here

    ArrayList<FileSKVIterator> readers = new ArrayList<FileSKVIterator>(filesToCompact.size());
    Span span = Trace.start("compact");
    try {
      long entriesCompacted = 0;
      List<SortedKeyValueIterator<Key,Value>> iters = openMapDataFiles(lgName, conf, fs, filesToCompact, extent, readers);
      CountingIterator citr = new CountingIterator(new MultiIterator(iters, extent.toDataRange()));
      DeletingIterator delIter = new DeletingIterator(citr, propogateDeletes);
     
      IteratorEnvironment iterEnv = new TabletIteratorEnvironment(IteratorScope.majc, !propogateDeletes, acuTableConf);
     
      SortedKeyValueIterator<Key,Value> itr = IteratorUtil.loadIterators(IteratorScope.majc, delIter, extent, acuTableConf, iterEnv);
View Full Code Here

TOP

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

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.