Package org.apache.accumulo.core.cli

Examples of org.apache.accumulo.core.cli.ScannerOpts


 
  static class Opts extends ClientOnRequiredTable {}
 
  public static void main(String[] args) {
    Opts opts = new Opts();
    ScannerOpts scanOpts = new ScannerOpts();
    opts.parseArgs(ContinuousStatsCollector.class.getName(), args, scanOpts);
    Timer jtimer = new Timer();
   
    jtimer.schedule(new StatsCollectionTask(opts, scanOpts.scanBatchSize), 0, 30000);
  }
View Full Code Here


    opts.tableName = tableName;
    TestIngest.ingest(c, opts, new BatchWriterOpts());
    to.flush(tableName, null, null, true);
    VerifyIngest.Opts vopts = new VerifyIngest.Opts();
    vopts.tableName = tableName;
    VerifyIngest.verifyIngest(c, vopts, new ScannerOpts());
    String id = to.tableIdMap().get(tableName);
    Scanner s = c.createScanner(MetadataTable.NAME, Authorizations.EMPTY);
    s.setRange(new KeyExtent(new Text(id), null, null).toMetadataRange());
    s.fetchColumnFamily(MetadataSchema.TabletsSection.DataFileColumnFamily.NAME);
    assertTrue(FunctionalTestUtils.count(s) > 0);
    FileSystem fs = FileSystem.get(CachedConfiguration.getInstance());
    assertTrue(fs.listStatus(new Path(rootPath() + "/accumulo/tables/" + id)).length > 0);
    to.delete(tableName);
    assertEquals(0, FunctionalTestUtils.count(s));
    try {
      assertEquals(0, fs.listStatus(new Path(rootPath() + "/accumulo/tables/" + id)).length);
    } catch (FileNotFoundException ex) {
      // that's fine, too
    }
    assertNull(to.tableIdMap().get(tableName));
    to.create(tableName);
    TestIngest.ingest(c, opts, new BatchWriterOpts());
    VerifyIngest.verifyIngest(c, vopts, new ScannerOpts());
    to.delete(tableName);
  }
View Full Code Here

  public void renameTest() throws Exception {
    String[] tableNames = getUniqueNames(2);
    String name1 = tableNames[0];
    String name2 = tableNames[1];
    BatchWriterOpts bwOpts = new BatchWriterOpts();
    ScannerOpts scanOpts = new ScannerOpts();
    TestIngest.Opts opts = new TestIngest.Opts();
    opts.createTable = true;
    opts.tableName = name1;
    Connector c = getConnector();
    TestIngest.ingest(c, opts, bwOpts);
View Full Code Here

    // restart GC
    getCluster().start();
    UtilWaitThread.sleep(15 * 1000);
    int after = countFiles();
    VerifyIngest.verifyIngest(c, vopts, new ScannerOpts());
    assertTrue(after < before);
  }
View Full Code Here

    }
  }

  public static void main(String[] args) throws Exception {
    Opts opts = new Opts();
    ScannerOpts scanOpts = new ScannerOpts();
    BatchWriterOpts bwOpts = new BatchWriterOpts();
    opts.parseArgs(RemoveEntriesForMissingFiles.class.getName(), args, scanOpts, bwOpts);

    checkAllTables(opts.getInstance(), opts.principal, opts.getToken(), opts.fix);
  }
View Full Code Here

  }

  public static void main(String[] args) {
    Opts opts = new Opts();
    BatchWriterOpts bwOpts = new BatchWriterOpts();
    ScannerOpts scanOpts = new ScannerOpts();
    opts.parseArgs(TestBinaryRows.class.getName(), args, scanOpts, bwOpts);
   
    try {
      runTest(opts.getConnector(), opts, bwOpts, scanOpts);
    } catch (Exception e) {
View Full Code Here

 
  public static void main(String[] args) throws Exception {
    ArrayList<String> tableNames = new ArrayList<String>();
   
    Opts opts = new Opts();
    ScannerOpts scanOpts = new ScannerOpts();
    BatchWriterOpts bwOpts = new BatchWriterOpts();
    opts.parseArgs(TestMultiTableIngest.class.getName(), args, scanOpts, bwOpts);
    // create the test table within accumulo
    Connector connector;
    try {
View Full Code Here

    int numThreads = 1;
  }
 
  public static void main(String[] args) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
    Opts opts = new Opts();
    ScannerOpts scanOpts = new ScannerOpts();
    opts.parseArgs(QueryMetadataTable.class.getName(), args, scanOpts);
   
    Connector connector = opts.getConnector();
    Scanner scanner = connector.createScanner(MetadataTable.NAME, opts.auths);
    scanner.setBatchSize(scanOpts.scanBatchSize);
View Full Code Here

    public boolean useGet = false;
  }

  public static void main(String[] args) throws Exception {
    Opts opts = new Opts();
    ScannerOpts scanOpts = new ScannerOpts();
    opts.parseArgs(VerifyIngest.class.getName(), args, scanOpts);
    Instance instance = opts.getInstance();
    try {
      if (opts.trace) {
        String name = VerifyIngest.class.getSimpleName();
View Full Code Here

  }
 
  public static void main(String[] args) throws Exception {
   
    final CollectOptions opts = new CollectOptions();
    final ScannerOpts scanOpts = new ScannerOpts();
    opts.parseArgs(CollectTabletStats.class.getName(), args, scanOpts);
   
    String columnsTmp[] = new String[] {};
    if (opts.columns != null)
      columnsTmp = opts.columns.split(",");
View Full Code Here

TOP

Related Classes of org.apache.accumulo.core.cli.ScannerOpts

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.