Examples of IteratorSetting


Examples of org.apache.accumulo.core.client.IteratorSetting

 
  protected void setUpIterator(final int prio, final String name, final String term, final BatchScanner scanner, CommandLine cl) throws IOException {
    if (prio < 0) {
      throw new IllegalArgumentException("Priority < 0 " + prio);
    }
    final IteratorSetting grep = new IteratorSetting(prio, name, GrepIterator.class);
    GrepIterator.setTerm(grep, term);
    scanner.addScanIterator(grep);
  }
View Full Code Here

Examples of org.apache.accumulo.core.client.IteratorSetting

    if (in.readBoolean()) {
      int numIterators = in.readInt();
      iterators = new ArrayList<IteratorSetting>(numIterators);
      for (int i = 0; i < numIterators; i++) {
        iterators.add(new IteratorSetting(in));
      }
    }

    if (in.readBoolean()) {
      level = Level.toLevel(in.readInt());
View Full Code Here

Examples of org.apache.accumulo.core.client.IteratorSetting

  public List<IteratorSetting> getIterators() {
    ArrayList<IteratorSetting> ret = new ArrayList<IteratorSetting>();
   
    for (IterInfo ii : tac.getSsiList()) {
      IteratorSetting settings = new IteratorSetting(ii.getPriority(), ii.getIterName(), ii.getClassName());
      Map<String,String> options = tac.getSsio().get(ii.getIterName());
      settings.addOptions(options);
     
      ret.add(settings);
    }
   
    return ret;
View Full Code Here

Examples of org.apache.accumulo.core.client.IteratorSetting

      Scanner scanner = connector.createScanner(tableName, auth);
     
      if (opts != null) {
        if (opts.iterators != null) {
          for (org.apache.accumulo.proxy.thrift.IteratorSetting iter : opts.iterators) {
            IteratorSetting is = new IteratorSetting(iter.getPriority(), iter.getName(), iter.getIteratorClass(), iter.getProperties());
            scanner.addScanIterator(is);
          }
        }
        org.apache.accumulo.proxy.thrift.Range prange = opts.range;
        if (prange != null) {
View Full Code Here

Examples of org.apache.accumulo.core.client.IteratorSetting

      BatchScanner scanner = connector.createBatchScanner(tableName, auth, threads);
     
      if (opts != null) {
        if (opts.iterators != null) {
          for (org.apache.accumulo.proxy.thrift.IteratorSetting iter : opts.iterators) {
            IteratorSetting is = new IteratorSetting(iter.getPriority(), iter.getName(), iter.getIteratorClass(), iter.getProperties());
            scanner.addScanIterator(is);
          }
        }
       
        ArrayList<Range> ranges = new ArrayList<Range>();
View Full Code Here

Examples of org.apache.accumulo.core.client.IteratorSetting

    result.writer = getConnector(login).createBatchWriter(tableName, cfg);
    return result;
  }
 
  private IteratorSetting getIteratorSetting(org.apache.accumulo.proxy.thrift.IteratorSetting setting) {
    return new IteratorSetting(setting.priority, setting.name, setting.iteratorClass, setting.getProperties());
  }
View Full Code Here

Examples of org.apache.accumulo.core.client.IteratorSetting

  @Override
  public org.apache.accumulo.proxy.thrift.IteratorSetting getIteratorSetting(ByteBuffer login, String tableName, String iteratorName,
      org.apache.accumulo.proxy.thrift.IteratorScope scope) throws org.apache.accumulo.proxy.thrift.AccumuloException,
      org.apache.accumulo.proxy.thrift.AccumuloSecurityException, org.apache.accumulo.proxy.thrift.TableNotFoundException, TException {
    try {
      IteratorSetting is = getConnector(login).tableOperations().getIteratorSetting(tableName, iteratorName, getIteratorScope(scope));
      return new org.apache.accumulo.proxy.thrift.IteratorSetting(is.getPriority(), is.getName(), is.getIteratorClass(), is.getOptions());
    } catch (Exception e) {
      handleExceptionTNF(e);
      return null;
    }
  }
View Full Code Here

Examples of org.apache.accumulo.core.client.IteratorSetting

   
    System.out.println("Reading: ");
   
    String regex = "cf1.*";
   
    IteratorSetting is = new IteratorSetting(50, regex, RegExFilter.class);
    RegExFilter.setRegexs(is, null, regex, null, null, false);
   
    String cookie = tpc.proxy().createScanner(login, testTable, null);
   
    int i = 0;
View Full Code Here

Examples of org.apache.accumulo.core.client.IteratorSetting

  /**
   * @deprecated since 1.5.0; Use {@link #addIterator(Job, IteratorSetting)} to add the {@link VersioningIterator} instead.
   */
  @Deprecated
  public static void setMaxVersions(Configuration conf, int maxVersions) throws IOException {
    IteratorSetting vers = new IteratorSetting(1, "vers", VersioningIterator.class);
    try {
      VersioningIterator.setMaxVersions(vers, maxVersions);
    } catch (IllegalArgumentException e) {
      throw new IOException(e);
    }
View Full Code Here

Examples of org.apache.accumulo.core.client.IteratorSetting

      throw new Exception("Ended at " + expected + " not " + (finish + 2));
    }
  }
 
  private void setupIter(ScannerBase scanner) throws Exception {
    IteratorSetting dropMod = new IteratorSetting(50, "dropMod", "org.apache.accumulo.test.functional.DropModIter");
    dropMod.addOption("mod", "2");
    dropMod.addOption("drop", "0");
    scanner.addScanIterator(dropMod);
  }
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.