private static void deleteTable(Configuration conf, String[] args) {
    TableName tableName = TableName.valueOf(args[0]);
    try (Connection connection = ConnectionFactory.createConnection(conf);
      Admin admin = connection.getAdmin()) {
      try {
        admin.disableTable(tableName);
      } catch (TableNotEnabledException e) {
        LOG.debug("Dry mode: Table: " + tableName + " already disabled, so just deleting it.");
      }
      admin.deleteTable(tableName);
    } catch (IOException e) {
      LOG.error(format("***Dry run: Failed to delete table '%s'.***%n%s", tableName, e.toString()));
      return;
    }
    LOG.info(format("Dry run: Deleted table '%s'.", tableName));
  }
Sets up the actual job.
@param conf The current configuration.
@param args The command line parameters.
@return The newly created job.
@throws IOException When setting up the job fails.
hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/ImportTsv.java