Package org.apache.accumulo.proxy.thrift

Examples of org.apache.accumulo.proxy.thrift.IteratorSetting


    ByteBuffer badLogin = client.login("user", properties);
    client.dropLocalUser(creds, "user");
    String table = "test1";
    client.createTable(creds, table, false, TimeType.MILLIS);
   
    final IteratorSetting setting = new IteratorSetting(100, "slow", SlowIterator.class.getName(), Collections.singletonMap("sleepTime", "200"));
   
    try {
      client.addConstraint(badLogin, table, NumericValueConstraint.class.getName());
      fail("exception not thrown");
    } catch (AccumuloSecurityException ex) {}
View Full Code Here


    } catch (TableNotFoundException ex) {}
    try {
      client.addSplits(creds, doesNotExist, Collections.<ByteBuffer> emptySet());
      fail("exception not thrown");
    } catch (TableNotFoundException ex) {}
    final IteratorSetting setting = new IteratorSetting(100, "slow", SlowIterator.class.getName(), Collections.singletonMap("sleepTime", "200"));
    try {
      client.attachIterator(creds, doesNotExist, setting, EnumSet.allOf(IteratorScope.class));
      fail("exception not thrown");
    } catch (TableNotFoundException ex) {}
    try {
View Full Code Here

    // Should take 5 seconds to read every record
    for (int i = 0; i < 20; i++) {
      client.updateAndFlush(creds, "slow", mutation("row" + i, "cf", "cq", "value"));
    }

    IteratorSetting setting = new IteratorSetting(100, "slow", SlowIterator.class.getName(), Collections.singletonMap("sleepTime", "250"));
    client.attachIterator(creds, "slow", setting, EnumSet.allOf(IteratorScope.class));
   
    // scan
    Thread t = new Thread() {
      @Override
View Full Code Here

    client.deleteTable(creds, TABLE_TEST);
    client.createTable(creds, TABLE_TEST, true, TimeType.MILLIS);
    HashMap<String,String> options = new HashMap<String,String>();
    options.put("type", "STRING");
    options.put("columns", "cf");
    IteratorSetting setting = new IteratorSetting(10, TABLE_TEST, SummingCombiner.class.getName(), options);
    client.attachIterator(creds, TABLE_TEST, setting, EnumSet.allOf(IteratorScope.class));
    for (int i = 0; i < 10; i++) {
      client.updateAndFlush(creds, TABLE_TEST, mutation("row1", "cf", "cq", "1"));
    }
    scanner = client.createScanner(creds, TABLE_TEST, null);
View Full Code Here

    String regex = ".*[02468]";
   
    org.apache.accumulo.core.client.IteratorSetting is = new org.apache.accumulo.core.client.IteratorSetting(50, regex, RegExFilter.class);
    RegExFilter.setRegexs(is, regex, null, null, null, false);
   
    IteratorSetting pis = Util.iteratorSetting2ProxyIteratorSetting(is);
    ScanOptions opts = new ScanOptions();
    opts.iterators = Collections.singletonList(pis);
    String cookie = tpc.proxy().createScanner(userpass, testtable, opts);
   
    int i = 0;
View Full Code Here

    String regex = ".*[02468]";
   
    org.apache.accumulo.core.client.IteratorSetting is = new org.apache.accumulo.core.client.IteratorSetting(50, regex, RegExFilter.class);
    RegExFilter.setRegexs(is, regex, null, null, null, false);
   
    IteratorSetting pis = Util.iteratorSetting2ProxyIteratorSetting(is);
    ScanOptions opts = new ScanOptions();
    opts.iterators = Collections.singletonList(pis);
    String cookie = tpc.proxy().createScanner(userpass, testtable, opts);
   
    int i = 0;
View Full Code Here

    String regex = ".*[02468]";
   
    org.apache.accumulo.core.client.IteratorSetting is = new org.apache.accumulo.core.client.IteratorSetting(50, regex, RegExFilter.class);
    RegExFilter.setRegexs(is, regex, null, null, null, false);
   
    IteratorSetting pis = Util.iteratorSetting2ProxyIteratorSetting(is);
    ScanOptions opts = new ScanOptions();
    opts.iterators = Collections.singletonList(pis);
    String cookie = tpc.proxy().createScanner(userpass, testtable, opts);
   
    int i = 0;
View Full Code Here

  public static ByteBuffer randStringBuffer(int numbytes) {
    return ByteBuffer.wrap(new BigInteger(numbytes * 5, random).toString(32).getBytes(Constants.UTF8));
  }
 
  public static IteratorSetting iteratorSetting2ProxyIteratorSetting(org.apache.accumulo.core.client.IteratorSetting is) {
    return new IteratorSetting(is.getPriority(), is.getName(), is.getIteratorClass(), is.getOptions());
  }
View Full Code Here

    String regex = ".*[02468]";
   
    org.apache.accumulo.core.client.IteratorSetting is = new org.apache.accumulo.core.client.IteratorSetting(50, regex, RegExFilter.class);
    RegExFilter.setRegexs(is, regex, null, null, null, false);
   
    IteratorSetting pis = Util.iteratorSetting2ProxyIteratorSetting(is);
    ScanOptions opts = new ScanOptions();
    opts.iterators = Collections.singletonList(pis);
    String cookie = tpc.proxy().createScanner(userpass, testtable, opts);
   
    int i = 0;
View Full Code Here

    String regex = ".*[02468]";
   
    org.apache.accumulo.core.client.IteratorSetting is = new org.apache.accumulo.core.client.IteratorSetting(50, regex, RegExFilter.class);
    RegExFilter.setRegexs(is, regex, null, null, null, false);
   
    IteratorSetting pis = Util.iteratorSetting2ProxyIteratorSetting(is);
    ScanOptions opts = new ScanOptions();
    opts.iterators = Collections.singletonList(pis);
    String cookie = tpc.proxy().createScanner(userpass, testtable, opts);
   
    int i = 0;
View Full Code Here

TOP

Related Classes of org.apache.accumulo.proxy.thrift.IteratorSetting

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.