Package org.apache.hadoop.hbase

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


    try {
      HBaseAdmin admin = new HBaseAdmin(conf);
     
      for (String table : tableList) {
        println("Dropping " + table + "... Please wait.");
        admin.deleteTable(new Text(table));
      }
     
      return new ReturnMsg(1, "Table(s) dropped successfully.");
    } catch (IOException e) {
      return new ReturnMsg(0, extractErrMsg(e));
View Full Code Here


      for (String table : tableList) {
        if (!conn.tableExists(new Text(table))) {
          println("'" + table + "' table not found.");
        } else {
          println("Dropping " + table + "... Please wait.");
          admin.deleteTable(new Text(table));
          count++;
        }
      }

      if (count > 0) {
View Full Code Here

          break;
        }
      }
      println("Truncating a '" + tableName + "' table ... Please wait.");

      admin.deleteTable(tableName); // delete the table
      HTableDescriptor tableDesc = new HTableDescriptor(tableName.toString());
      for (int i = 0; i < columns.length; i++) {
        tableDesc.addFamily(columns[i]);
      }
      admin.createTable(tableDesc); // re-create the table
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.