static void cleanupEmptyTableDir(HiveConf conf, String tmpTableName)
        throws IOException, HiveException {
      org.apache.hadoop.hive.ql.metadata.Table tmpTable = Hive.get().getTable(tmpTableName);
      if (tmpTable != null) {
        cleanupEmptyDir(conf, new Path(tmpTable.getSd().getLocation()));
      }
    }
Remove the root directory of a table if it's empty.
@param conf the Hive configuration
@param tmpTableName name of the table
@throws IOException the directory cannot be deleted
@throws HiveException the table is not found
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/QueryCompactor.java