private void alterPartitionSpec(Table tbl,
                                  Map<String, String> partSpec,
                                  org.apache.hadoop.hive.metastore.api.Partition tpart,
                                  boolean inheritTableSpecs,
                                  String partPath) throws HiveException, InvalidOperationException {

    alterPartitionSpecInMemory(tbl, partSpec, tpart, inheritTableSpecs, partPath);
    alterPartition(tbl.getCatalogName(), tbl.getDbName(), tbl.getTableName(),
        new Partition(tbl, tpart), null, true);
  }
Returns partition metadata

@param tbl
         the partition's table
@param partSpec
         partition keys and values
@param forceCreate
         if this is true and partition doesn't exist then a partition is
         created
@param partPath the path where the partition data is located
@param inheritTableSpecs whether to copy over the table specs for if/of/serde
@return result partition object or null if there is no partition
@throws HiveException
ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java