Examples of disableTable()


Examples of org.apache.hadoop.hbase.client.HBaseAdmin.disableTable()

     }
    
     HTableDescriptor wordcount = new HTableDescriptor(TABLE_NAME);
     hbase.createTable(wordcount);
     // Cannot edit a stucture on an active table.
     hbase.disableTable(TABLE_NAME);
     HColumnDescriptor columnFamily = new HColumnDescriptor(COLUMN_FAMILY);
     hbase.addColumn(TABLE_NAME, columnFamily);
     hbase.enableTable(TABLE_NAME);
    
     hbase.close();
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HBaseAdmin.disableTable()

      }
      tables.remove(tableName);
    }
   
    for (String table : tables) {
      admin.disableTable(table);
      admin.deleteTable(table);
    }
  }
 
  private HTableDescriptor createTable(String tableName) {
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HBaseAdmin.disableTable()

    try {
      HBaseAdmin admin = new HBaseAdmin(config);
      HTableDescriptor[] descriptors = admin.listTables();
      for (HTableDescriptor hTableDescriptor : descriptors) {
        String name = hTableDescriptor.getNameAsString();
        admin.disableTable(name);
        admin.deleteTable(name);
      }
    } catch(IOException e) {
      throw new SienaException(e);
    }
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HBaseAdmin.disableTable()

    servlet.getMetrics().incrementRequests(1);
    try {
      HBaseAdmin admin = new HBaseAdmin(servlet.getConfiguration());
      boolean success = false;
      for (int i = 0; i < 10; i++) try {
        admin.disableTable(actualTableName);
        success = true;
        break;
      } catch (IOException e) {
      }
      if (!success) {
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HBaseAdmin.disableTable()

    Get g = new Get("TEST".getBytes());
    g.addFamily(cf.getBytes());
    hTable.get(g);
    assertTimeVaryingMetricCount(1, TABLE_NAME, cf, regionName, "get_");
    HBaseAdmin admin = TEST_UTIL.getHBaseAdmin();
    admin.disableTable(TABLE_NAME.getBytes());
    admin.deleteTable(TABLE_NAME.getBytes());

    assertTimeVaryingMetricCount(0, TABLE_NAME, cf, regionName, "get_");

    hTable.close();
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HBaseAdmin.disableTable()

      log.info("Connecting to hbase...");
      HBaseAdmin hba = new HBaseAdmin(hc);
      log.info("Creating Table {}", output);
     
      if (hba.tableExists(output)) {
        hba.disableTable(output);
        hba.deleteTable(output);
        hba.majorCompact(".META.");
      }
      hba.createTable(ht);
      conf.set("output.table", output);
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HBaseAdmin.disableTable()

    // and load the table
    UTIL.loadRegion(region, TEST_FAM);

    // shutdown the table so we can manipulate the files
    admin.disableTable(TABLE_NAME);

    FileSystem fs = UTIL.getTestFileSystem();

    // now attempt to depose the region
    Path regionDir = HRegion.getRegionDir(region.getTableDir().getParent(), region.getRegionInfo());
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HBaseAdmin.disableTable()

    final byte[] qualifier = Bytes.toBytes("q");

    // create table
    HBaseAdmin admin = TEST_UTIL.getHBaseAdmin();
    if (admin.tableExists(tableName)) {
      admin.disableTable(tableName);
      admin.deleteTable(tableName);
    }
    HTableDescriptor htd = new HTableDescriptor(tableName);
    htd.addFamily(new HColumnDescriptor(family1));
    htd.addFamily(new HColumnDescriptor(family2));
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HBaseAdmin.disableTable()

    verifyDenied(gblUser, getActionAll, getAction1, getAction2);
    verifyDenied(gblUser, putActionAll, putAction1, putAction2);
    verifyDenied(gblUser, deleteActionAll, deleteAction1, deleteAction2);

    // delete table
    admin.disableTable(tableName);
    admin.deleteTable(tableName);
  }

  private boolean hasFoundUserPermission(UserPermission userPermission, List<UserPermission> perms) {
    return perms.contains(userPermission);
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HBaseAdmin.disableTable()

    final byte[] qualifier = Bytes.toBytes("q");

    // create table
    HBaseAdmin admin = TEST_UTIL.getHBaseAdmin();
    if (admin.tableExists(tableName)) {
      admin.disableTable(tableName);
      admin.deleteTable(tableName);
    }
    HTableDescriptor htd = new HTableDescriptor(tableName);
    htd.addFamily(new HColumnDescriptor(family1));
    htd.addFamily(new HColumnDescriptor(family2));
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.