Package org.apache.accumulo.server.cli

Examples of org.apache.accumulo.server.cli.ClientOpts


import org.apache.accumulo.core.security.TablePermission;
import org.apache.hadoop.io.Text;

public class GCLotsOfCandidatesTest {
  public static void main(String args[]) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, MutationsRejectedException {
    ClientOpts opts = new ClientOpts();
    BatchWriterOpts bwOpts = new BatchWriterOpts();
    opts.parseArgs(GCLotsOfCandidatesTest.class.getName(), args, bwOpts);
   
    Connector conn = opts.getConnector();
    conn.securityOperations().grantTablePermission(conn.whoami(), Constants.METADATA_TABLE_NAME, TablePermission.WRITE);
    BatchWriter bw = conn.createBatchWriter(Constants.METADATA_TABLE_NAME, bwOpts.getBatchWriterConfig());
   
    for (int i = 0; i < 100000; ++i) {
      final Text emptyText = new Text("");
View Full Code Here


public class FindOfflineTablets {
  private static final Logger log = Logger.getLogger(FindOfflineTablets.class);
 
  public static void main(String[] args) throws Exception {
    ClientOpts opts = new ClientOpts();
    opts.parseArgs(FindOfflineTablets.class.getName(), args);
    final AtomicBoolean scanning = new AtomicBoolean(false);
    Instance instance = opts.getInstance();
    MetaDataTableScanner rootScanner = new MetaDataTableScanner(instance, SecurityConstants.getSystemCredentials(), Constants.METADATA_ROOT_TABLET_KEYSPACE);
    MetaDataTableScanner metaScanner = new MetaDataTableScanner(instance, SecurityConstants.getSystemCredentials(), Constants.NON_ROOT_METADATA_KEYSPACE);
    @SuppressWarnings("unchecked")
    Iterator<TabletLocationState> scanner = (Iterator<TabletLocationState>)new IteratorChain(rootScanner, metaScanner);
    LiveTServerSet tservers = new LiveTServerSet(instance, DefaultConfiguration.getDefaultConfiguration(), new Listener() {
View Full Code Here

import org.apache.hadoop.fs.Path;

public class LocalityCheck {
 
  public int run(String[] args) throws Exception {
    ClientOpts opts = new ClientOpts();
    opts.parseArgs(LocalityCheck.class.getName(), args);
   
    FileSystem fs = FileSystem.get(CachedConfiguration.getInstance());
    Connector connector = opts.getConnector();
    Scanner scanner = connector.createScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS);
    scanner.fetchColumnFamily(Constants.METADATA_CURRENT_LOCATION_COLUMN_FAMILY);
    scanner.fetchColumnFamily(Constants.METADATA_DATAFILE_COLUMN_FAMILY);
    scanner.setRange(Constants.METADATA_KEYSPACE);
   
View Full Code Here

        " verify.total " + verify.total);
    return chopped == verify.chopped && unassigned == verify.unassigned && unassigned == verify.total;
  }
 
  public static void main(String[] args) throws Exception {
    ClientOpts opts = new ClientOpts();
    opts.parseArgs(MergeStats.class.getName(), args);
   
    Connector conn = opts.getConnector();
    Map<String,String> tableIdMap = conn.tableOperations().tableIdMap();
    for (Entry<String,String> entry : tableIdMap.entrySet()) {
      final String table = entry.getKey(), tableId = entry.getValue();
      String path = ZooUtil.getRoot(conn.getInstance().getInstanceID()) + Constants.ZTABLES + "/" + tableId + "/merge";
      MergeInfo info = new MergeInfo();
View Full Code Here

    return result;
  }
 
  static public void main(String[] args) {
   
    ClientOpts opts = new ClientOpts();
    ScannerOpts scanOpts = new ScannerOpts();
    BatchWriterOpts bwOpts = new BatchWriterOpts();
    opts.parseArgs(TestRandomDeletes.class.getName(), args, scanOpts, bwOpts);
   
    try {
      long deleted = 0;
     
      Text t = new Text("test_ingest");
View Full Code Here

/**
* This little program is used by the functional test to get a list of table ids.
*/
public class ListTables {
  public static void main(String[] args) throws Exception {
    ClientOpts opts = new ClientOpts();
    opts.parseArgs(ListTables.class.getName(), args);
    for (Entry<String,String> table : Tables.getNameToIdMap(opts.getInstance()).entrySet())
      System.out.println(table.getKey() + " => " + table.getValue());
  }
View Full Code Here

import org.apache.hadoop.fs.Path;

public class LocalityCheck {
 
  public int run(String[] args) throws Exception {
    ClientOpts opts = new ClientOpts();
    opts.parseArgs(LocalityCheck.class.getName(), args);
   
    FileSystem fs = FileSystem.get(CachedConfiguration.getInstance());
    Connector connector = opts.getConnector();
    Scanner scanner = connector.createScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS);
    scanner.fetchColumnFamily(Constants.METADATA_CURRENT_LOCATION_COLUMN_FAMILY);
    scanner.fetchColumnFamily(Constants.METADATA_DATAFILE_COLUMN_FAMILY);
    scanner.setRange(Constants.METADATA_KEYSPACE);
   
View Full Code Here

import org.apache.accumulo.core.security.TablePermission;
import org.apache.hadoop.io.Text;

public class GCLotsOfCandidatesTest {
  public static void main(String args[]) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, MutationsRejectedException {
    ClientOpts opts = new ClientOpts();
    BatchWriterOpts bwOpts = new BatchWriterOpts();
    opts.parseArgs(GCLotsOfCandidatesTest.class.getName(), args, bwOpts);
   
    Connector conn = opts.getConnector();
    conn.securityOperations().grantTablePermission(conn.whoami(), Constants.METADATA_TABLE_NAME, TablePermission.WRITE);
    BatchWriter bw = conn.createBatchWriter(Constants.METADATA_TABLE_NAME, bwOpts.getBatchWriterConfig());
   
    for (int i = 0; i < 100000; ++i) {
      final Text emptyText = new Text("");
View Full Code Here

 
  /**
   * @param args
   */
  public static void main(String[] args) throws Exception {
    ClientOpts opts = new ClientOpts();
    opts.parseArgs(FindOfflineTablets.class.getName(), args);
    final AtomicBoolean scanning = new AtomicBoolean(false);
    Instance instance = opts.getInstance();
    MetaDataTableScanner rootScanner = new MetaDataTableScanner(instance, SecurityConstants.getSystemCredentials(), Constants.METADATA_ROOT_TABLET_KEYSPACE);
    MetaDataTableScanner metaScanner = new MetaDataTableScanner(instance, SecurityConstants.getSystemCredentials(), Constants.NON_ROOT_METADATA_KEYSPACE);
    @SuppressWarnings("unchecked")
    Iterator<TabletLocationState> scanner = (Iterator<TabletLocationState>)new IteratorChain(rootScanner, metaScanner);
    LiveTServerSet tservers = new LiveTServerSet(instance, DefaultConfiguration.getDefaultConfiguration(), new Listener() {
View Full Code Here

        " verify.total " + verify.total);
    return chopped == verify.chopped && unassigned == verify.unassigned && unassigned == verify.total;
  }
 
  public static void main(String[] args) throws Exception {
    ClientOpts opts = new ClientOpts();
    opts.parseArgs(MergeStats.class.getName(), args);
   
    Connector conn = opts.getConnector();
    Map<String,String> tableIdMap = conn.tableOperations().tableIdMap();
    for (String table : tableIdMap.keySet()) {
      String tableId = tableIdMap.get(table);
      String path = ZooUtil.getRoot(conn.getInstance().getInstanceID()) + Constants.ZTABLES + "/" + tableId.toString() + "/merge";
      MergeInfo info = new MergeInfo();
View Full Code Here

TOP

Related Classes of org.apache.accumulo.server.cli.ClientOpts

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.