static void deleteDir(Path dir, boolean shouldEnableCm, Configuration conf) throws HiveException {
    try {
      Warehouse wh = new Warehouse(conf);
      wh.deleteDir(dir, true, false, shouldEnableCm);
    } catch (MetaException e) {
      throw new HiveException(e);
    }
  }
Checks in partition is in custom (not-standard) location.
@param table - table in which partition is
@param partition - partition
@return true if partition location is custom, false if it is standard
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/storage/archive/AlterTableArchiveUtils.java