static void setIsArchived(Partition partition, boolean state, int level) {
    Map<String, String> params = partition.getParameters();
    if (state) {
      params.put(hive_metastoreConstants.IS_ARCHIVED, "true");
      params.put(ArchiveUtils.ARCHIVING_LEVEL, Integer.toString(level));
    } else {
      params.remove(hive_metastoreConstants.IS_ARCHIVED);
      params.remove(ArchiveUtils.ARCHIVING_LEVEL);
    }
  }
Sets archiving flag locally; it has to be pushed into metastore.
@param partition partition to set flag
@param state desired state of IS_ARCHIVED flag
@param level desired level for state == true, anything for false
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/storage/archive/AlterTableArchiveUtils.java