Examples of disableTable()


Examples of com.alibaba.wasp.client.WaspAdmin.disableTable()

    count = stat.executeUpdate("DELETE FROM TEST WHERE ID=1");
    assertFalse(stat.getMoreResults());
    assertTrue(stat.getUpdateCount() == -1);

    WaspAdmin admin = new WaspAdmin(TEST_UTIL.getConfiguration());
    admin.disableTable("TEST");
    stat.execute("DROP TABLE TEST");
    admin.waitTableNotLocked("TEST".getBytes());
    stat.executeUpdate("DROP TABLE IF EXISTS TEST");

    assertTrue(stat.getWarnings() == null);
View Full Code Here

Examples of org.apache.blur.thrift.generated.Blur.Iface.disableTable()

  public static void main(String[] args) throws BlurException, TException, IOException {
    String connectionStr = args[0];
    final String tableName = args[1];

    Iface client = BlurClient.getClient(connectionStr);
    client.disableTable(tableName);
  }
}
View Full Code Here

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

  public ReturnMsg execute(Configuration conf) {
    assert tableName != null;
   
    try {
      HBaseAdmin admin = new HBaseAdmin(conf);
      admin.disableTable(new Text(tableName));
     
      return new ReturnMsg(1, "Table disabled successfully.");
    } catch (IOException e) {
      String[] msg = e.getMessage().split("[\n]");
      return new ReturnMsg(0, msg[0]);
View Full Code Here

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

        TableName.valueOf("testTableExists");
    assertFalse(MetaTableAccessor.tableExists(hConnection, name));
    UTIL.createTable(name, HConstants.CATALOG_FAMILY);
    assertTrue(MetaTableAccessor.tableExists(hConnection, name));
    Admin admin = UTIL.getHBaseAdmin();
    admin.disableTable(name);
    admin.deleteTable(name);
    assertFalse(MetaTableAccessor.tableExists(hConnection, name));
    assertTrue(MetaTableAccessor.tableExists(hConnection,
      TableName.META_TABLE_NAME));
  }
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

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

    verifyDenied(user, getQualifierAction);
    verifyDenied(user, putQualifierAction);
    verifyDenied(user, deleteQualifierAction);

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

  @Test
  public void testPermissionList() throws Exception {
View Full Code Here

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

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

    // 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()

    assertFalse("User should not be granted permission: " + upToVerify.toString(),
      hasFoundUserPermission(upToVerify, perms));

    // disable table before modification
    admin.disableTable(tableName);

    User newOwner = User.createUserForTesting(conf, "new_owner", new String[] {});
    htd.setOwner(newOwner);
    admin.modifyTable(tableName, htd);
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.