Package org.apache.hadoop.hbase

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


        for (Text column : getColumnList(admin, hTable)) {
          hTable.delete(lockID, new Text(column));
        }
        hTable.commit(lockID);
      } else {
        admin.disableTable(tableName);
        for (Text column : getColumnList(admin, hTable)) {
          admin.deleteColumn(tableName, new Text(column));
        }
        admin.enableTable(tableName);
      }
View Full Code Here

      if (!conn.tableExists(new Text(tableName))) {
        return new ReturnMsg(0, "'" + tableName + "'" + TABLE_NOT_FOUND);
      }

      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

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.