Examples of tableOperations()


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

    }
   
    String table = conf.get(Property.TRACE_TABLE);
    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) {
View Full Code Here

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

      for (int i = 0; i < opts.count / 100; i++) {
        keys.add(new Text(String.format("%05d", i * 100)));
      }
     
      // presplit
      connector.tableOperations().create(opts.getTableName());
      connector.tableOperations().addSplits(opts.getTableName(), keys);
      BatchWriter b = connector.createBatchWriter(opts.getTableName(), bwOpts.getBatchWriterConfig());
     
      // populate
      for (int i = 0; i < opts.count; i++) {
View Full Code Here

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

        keys.add(new Text(String.format("%05d", i * 100)));
      }
     
      // presplit
      connector.tableOperations().create(opts.getTableName());
      connector.tableOperations().addSplits(opts.getTableName(), keys);
      BatchWriter b = connector.createBatchWriter(opts.getTableName(), bwOpts.getBatchWriterConfig());
     
      // populate
      for (int i = 0; i < opts.count; i++) {
        Mutation m = new Mutation(new Text(String.format("%05d", i)));
View Full Code Here

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

    if (opts.scanOffline) {
      Random random = new Random();
      clone = opts.getTableName() + "_" + String.format("%016x", (random.nextLong() & 0x7fffffffffffffffl));
      conn = opts.getConnector();
      conn.tableOperations().clone(opts.getTableName(), clone, true, new HashMap<String,String>(), new HashSet<String>());
      ranges = conn.tableOperations().splitRangeByTablets(opts.getTableName(), new Range(), opts.maxMaps);
      conn.tableOperations().offline(clone);
      AccumuloInputFormat.setInputTableName(job, clone);
      AccumuloInputFormat.setOfflineTableScan(job, true);
    } else {
View Full Code Here

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

    if (opts.scanOffline) {
      Random random = new Random();
      clone = opts.getTableName() + "_" + String.format("%016x", (random.nextLong() & 0x7fffffffffffffffl));
      conn = opts.getConnector();
      conn.tableOperations().clone(opts.getTableName(), clone, true, new HashMap<String,String>(), new HashSet<String>());
      ranges = conn.tableOperations().splitRangeByTablets(opts.getTableName(), new Range(), opts.maxMaps);
      conn.tableOperations().offline(clone);
      AccumuloInputFormat.setInputTableName(job, clone);
      AccumuloInputFormat.setOfflineTableScan(job, true);
    } else {
      ranges = opts.getConnector().tableOperations().splitRangeByTablets(opts.getTableName(), new Range(), opts.maxMaps);
View Full Code Here

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

      Random random = new Random();
      clone = opts.getTableName() + "_" + String.format("%016x", (random.nextLong() & 0x7fffffffffffffffl));
      conn = opts.getConnector();
      conn.tableOperations().clone(opts.getTableName(), clone, true, new HashMap<String,String>(), new HashSet<String>());
      ranges = conn.tableOperations().splitRangeByTablets(opts.getTableName(), new Range(), opts.maxMaps);
      conn.tableOperations().offline(clone);
      AccumuloInputFormat.setInputTableName(job, clone);
      AccumuloInputFormat.setOfflineTableScan(job, true);
    } else {
      ranges = opts.getConnector().tableOperations().splitRangeByTablets(opts.getTableName(), new Range(), opts.maxMaps);
    }
View Full Code Here

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

    TextOutputFormat.setOutputPath(job, new Path(opts.outputDir));

    job.waitForCompletion(true);

    if (opts.scanOffline) {
      conn.tableOperations().delete(clone);
    }
    opts.stopTracing();
    return job.isSuccessful() ? 0 : 1;
  }
View Full Code Here

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

    Random rand = new Random();
    if (rand.nextInt(10) < 5) {
      // setup locality groups
      Map<String,Set<Text>> groups = getLocalityGroups();
     
      conn.tableOperations().setLocalityGroups(imageTableName, groups);
      log.debug("Configured locality groups for " + imageTableName + " groups = " + groups);
    }
   
    state.set("numWrites", Long.valueOf(0));
    state.set("totalWrites", Long.valueOf(0));
View Full Code Here

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

    // Now we can safely delete the tables
    log.debug("Dropping tables: " + imageTableName + " " + indexTableName);
   
    Connector conn = state.getConnector();
   
    conn.tableOperations().delete(imageTableName);
    conn.tableOperations().delete(indexTableName);
   
    log.debug("Final total of writes: " + state.getLong("totalWrites"));
  }
}
View Full Code Here

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

    log.debug("Dropping tables: " + imageTableName + " " + indexTableName);
   
    Connector conn = state.getConnector();
   
    conn.tableOperations().delete(imageTableName);
    conn.tableOperations().delete(indexTableName);
   
    log.debug("Final total of writes: " + state.getLong("totalWrites"));
  }
}
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.