private void deleteIntermediateOriginalDir(Table table, Path intermediateOriginalDir) throws HiveException {
    if (HdfsUtils.pathExists(intermediateOriginalDir, context.getConf())) {
      boolean shouldEnableCm = ReplChangeManager.shouldEnableCm(context.getDb().getDatabase(table.getDbName()),
          table.getTTable());
      AlterTableArchiveUtils.deleteDir(intermediateOriginalDir, shouldEnableCm, context.getConf());
    }
  }
Sets the appropriate attributes in the supplied Partition object to mark
it as archived. Note that the metastore is not touched - a separate
call to alter_partition is needed.

@param p - the partition object to modify
@param harPath - new location of partition (har schema URI)
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/storage/archive/AlterTableArchiveOperation.java