Examples of addScanIterator()


Examples of org.apache.accumulo.core.client.Scanner.addScanIterator()

    for (Entry<Key,Value> entry : scanner) {
      entry.getKey();
    }
   
    // set a non existant iterator, should cause scan to fail on server side
    scanner.addScanIterator(new IteratorSetting(100, "bogus", "com.bogus.iterator"));
   
    caught = false;
    try {
      for (Entry<Key,Value> entry : scanner) {
        // should error
View Full Code Here

Examples of org.apache.accumulo.core.client.Scanner.addScanIterator()

    ZooKeeperInstance instance = new ZooKeeperInstance(cluster.getInstanceName(), cluster.getZooKeepers());
    Connector connector = instance.getConnector("root", new PasswordToken(secret));
    final Scanner s = connector.createScanner(table, Constants.NO_AUTHS);
    IteratorSetting cfg = new IteratorSetting(30, SlowIterator.class);
    cfg.addOption("sleepTime", "500");
    s.addScanIterator(cfg);

    Thread thread = new Thread() {
      public void run() {
        try {
          for (@SuppressWarnings("unused")
View Full Code Here

Examples of org.apache.accumulo.core.client.Scanner.addScanIterator()

        }
        setupMaxVersions(scanner, maxVersions);
        if (rowRegex != null || colfRegex != null || colqRegex != null || valueRegex != null) {
          IteratorSetting is = new IteratorSetting(50, RegExFilter.class);
          RegExFilter.setRegexs(is, rowRegex, colfRegex, colqRegex, valueRegex, false);
          scanner.addScanIterator(is);
        }
        setupIterators(scanner, iterators, options);
      } catch (Exception e) {
        throw new IOException(e);
      }
View Full Code Here

Examples of org.apache.accumulo.core.client.Scanner.addScanIterator()

    // handle first argument, if present, the authorizations list to
    // scan with
    final Authorizations auths = getAuths(cl, shellState);
    final Scanner scanner = shellState.getConnector().createScanner(tableName, auths);
   
    scanner.addScanIterator(new IteratorSetting(Integer.MAX_VALUE, "NOVALUE", SortedKeyIterator.class));
   
    // handle session-specific scan iterators
    addScanIterators(shellState, cl, scanner, tableName);
   
    // handle remaining optional arguments
View Full Code Here

Examples of org.apache.accumulo.core.client.Scanner.addScanIterator()

    for (Entry<Key,Value> entry : scanner) {
      entry.getKey();
    }
   
    // set a non existant iterator, should cause scan to fail on server side
    scanner.addScanIterator(new IteratorSetting(100, "bogus", "com.bogus.iterator"));
   
    caught = false;
    try {
      for (Entry<Key,Value> entry : scanner) {
        // should error
View Full Code Here

Examples of org.apache.accumulo.core.client.Scanner.addScanIterator()

    // initialize a scanner to ensure the new setting does not conflict with existing settings
    final String user = shellState.getConnector().whoami();
    final Authorizations auths = shellState.getConnector().securityOperations().getUserAuthorizations(user);
    final Scanner scanner = shellState.getConnector().createScanner(tableName, auths);
    for (IteratorSetting s : tableScanIterators) {
      scanner.addScanIterator(s);
    }
    scanner.addScanIterator(setting);
   
    // if no exception has been thrown, it's safe to add it to the list
    tableScanIterators.add(setting);
View Full Code Here

Examples of org.apache.accumulo.core.client.Scanner.addScanIterator()

    final Authorizations auths = shellState.getConnector().securityOperations().getUserAuthorizations(user);
    final Scanner scanner = shellState.getConnector().createScanner(tableName, auths);
    for (IteratorSetting s : tableScanIterators) {
      scanner.addScanIterator(s);
    }
    scanner.addScanIterator(setting);
   
    // if no exception has been thrown, it's safe to add it to the list
    tableScanIterators.add(setting);
    Shell.log.debug("Scan iterators :" + shellState.scanIteratorOptions.get(tableName));
  }
View Full Code Here

Examples of org.apache.accumulo.core.client.Scanner.addScanIterator()

      System.out.println("executing middle wildcard search for " + regexString + " from entries ending with " + lastPart);
      scanner.setRange(Range.prefix(getReverseIndex(lastPart)));
    }
    IteratorSetting regex = new IteratorSetting(50, "regex", RegExFilter.class);
    RegExFilter.setRegexs(regex, null, null, regexString, null, false);
    scanner.addScanIterator(regex);
    return scanner;
  }
 
  public static class Opts extends ClientOnRequiredTable {
    @Parameter(names="--path", description="the directory to list")
View Full Code Here

Examples of org.apache.accumulo.core.client.Scanner.addScanIterator()

     
      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) {
          Range range = new Range(Util.fromThrift(prange.getStart()), prange.startInclusive, Util.fromThrift(prange.getStop()), prange.stopInclusive);
View Full Code Here

Examples of org.apache.accumulo.core.client.Scanner.addScanIterator()

      return;
    }
   
    Connector connector = HdfsZooInstance.getInstance().getConnector(SecurityConstants.getSystemPrincipal(), SecurityConstants.getSystemToken());
    Scanner scanner = connector.createScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS);
    scanner.addScanIterator(new IteratorSetting(1, "keys-only", SortedKeyIterator.class));
   
    if (table == null) {
      scanner.setRange(new Range(new Text("~err_"), false, new Text("~err`"), false));
    } else {
      scanner.setRange(new Range(new Text("~err_" + table)));
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.