Examples of createScanner()


Examples of org.apache.accumulo.core.client.Connector.createScanner()

      if (opts != null && opts.isSetAuthorizations()) {
        auth = getAuthorizations(opts.authorizations);
      } else {
        auth = connector.securityOperations().getUserAuthorizations(connector.whoami());
      }
      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());
View Full Code Here

Examples of org.apache.accumulo.core.client.Connector.createScanner()

    bw.close();

    IteratorSetting is = new IteratorSetting(5, RegExFilter.class);
    RegExFilter.setRegexs(is, s2, null, null, null, true, true);

    Scanner scanner = conn.createScanner(table, new Authorizations());
    scanner.addScanIterator(is);

    assertTrue("Client side iterator couldn't find a match when it should have", scanner.iterator().hasNext());

    conn.tableOperations().attachIterator(table, is);
View Full Code Here

Examples of org.apache.accumulo.core.client.Connector.createScanner()

    scanner.addScanIterator(is);

    assertTrue("Client side iterator couldn't find a match when it should have", scanner.iterator().hasNext());

    conn.tableOperations().attachIterator(table, is);
    assertTrue("server side iterator couldn't find a match when it should have", conn.createScanner(table, new Authorizations()).iterator().hasNext());
  }
}
View Full Code Here

Examples of org.apache.accumulo.core.client.Connector.createScanner()

          bw.addMutation(m);
        }
       
        bw.close();
      } else if (opts.mode.equals("verifyDeleted")) {
        Scanner s = connector.createScanner(opts.tableName, opts.auths);
        s.setBatchSize(scanOpts.scanBatchSize);
        Key startKey = new Key(encodeLong(opts.start), CF_BYTES, CQ_BYTES, new byte[0], Long.MAX_VALUE);
        Key stopKey = new Key(encodeLong(opts.start + opts.num - 1), CF_BYTES, CQ_BYTES, new byte[0], 0);
        s.setBatchSize(50000);
        s.setRange(new Range(startKey, stopKey));
View Full Code Here

Examples of org.apache.accumulo.core.client.Connector.createScanner()

        }
       
      } else if (opts.mode.equals("verify")) {
        long t1 = System.currentTimeMillis();
       
        Scanner s = connector.createScanner(opts.tableName, opts.auths);
        Key startKey = new Key(encodeLong(opts.start), CF_BYTES, CQ_BYTES, new byte[0], Long.MAX_VALUE);
        Key stopKey = new Key(encodeLong(opts.start + opts.num - 1), CF_BYTES, CQ_BYTES, new byte[0], 0);
        s.setBatchSize(scanOpts.scanBatchSize);
        s.setRange(new Range(startKey, stopKey));
       
View Full Code Here

Examples of org.apache.accumulo.core.client.Connector.createScanner()

        long t1 = System.currentTimeMillis();
       
        for (int i = 0; i < numLookups; i++) {
          long row = ((r.nextLong() & 0x7fffffffffffffffl) % opts.num) + opts.start;
         
          Scanner s = connector.createScanner(opts.tableName, opts.auths);
          s.setBatchSize(scanOpts.scanBatchSize);
          Key startKey = new Key(encodeLong(row), CF_BYTES, CQ_BYTES, new byte[0], Long.MAX_VALUE);
          Key stopKey = new Key(encodeLong(row), CF_BYTES, CQ_BYTES, new byte[0], 0);
          s.setRange(new Range(startKey, stopKey));
         
View Full Code Here

Examples of org.apache.accumulo.core.client.Connector.createScanner()

    try {
      Connector conn = HdfsZooInstance.getInstance().getConnector(principal, at);
      if (!conn.tableOperations().exists(table)) {
        return new NullScanner();
      }
      Scanner scanner = conn.createScanner(table, conn.securityOperations().getUserAuthorizations(principal));
      return scanner;
    } catch (AccumuloSecurityException ex) {
      sb.append("<h2>Unable to read trace table: check trace username and password configuration.</h2>\n");
      return null;
    } catch (TableNotFoundException ex) {
View Full Code Here

Examples of org.apache.accumulo.core.client.Connector.createScanner()

    bw.addMutation(m);
   
    bw.close();
   
    int count = 0;
    Scanner scanner = uconn.createScanner("table1", new Authorizations("A"));
    for (Entry<Key,Value> entry : scanner) {
      if (entry.getKey().getColumnQualifierData().toString().equals("COUNT")) {
        Assert.assertEquals("2", entry.getValue().toString());
      } else if (entry.getKey().getColumnQualifierData().toString().equals("SIZE")) {
        Assert.assertEquals("8", entry.getValue().toString());
View Full Code Here

Examples of org.apache.accumulo.core.client.Connector.createScanner()

    }
   
    Assert.assertEquals(3, count);
   
    count = 0;
    scanner = uconn.createScanner("table1", new Authorizations("A", "B"));
    for (Entry<Key,Value> entry : scanner) {
      if (entry.getKey().getColumnQualifierData().toString().equals("IMG")) {
        Assert.assertEquals("ABCDEFGH", entry.getValue().toString());
      }
      count++;
View Full Code Here

Examples of org.apache.accumulo.core.client.Connector.createScanner()

        UtilWaitThread.sleep(100);
      }
    }

    // delete the clone markers and create directory entries
    Scanner mscanner = conn.createScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS);
    mscanner.setRange(new KeyExtent(new Text(tableId), null, null).toMetadataRange());
    mscanner.fetchColumnFamily(Constants.METADATA_CLONED_COLUMN_FAMILY);

    int dirCount = 0;
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.