private MPartition getMPartition(String catName, String dbName, String tableName, List<String> part_vals, MTable mtbl)
      throws MetaException {
    catName = normalizeIdentifier(catName);
    dbName = normalizeIdentifier(dbName);
    tableName = normalizeIdentifier(tableName);
    boolean committed = false;
    MPartition result = null;
    try {
      openTransaction();
      if (mtbl == null) {
        mtbl = getMTable(catName, dbName, tableName);
        if (mtbl == null) {
          return null;
        }
      }
      // Change the query to use part_vals instead of the name which is
      // redundant TODO: callers of this often get part_vals out of name for no reason...
      String name =
          Warehouse.makePartName(convertToFieldSchemas(mtbl.getPartitionKeys()), part_vals);
      result = getMPartition(catName, dbName, tableName, name);
      committed = commitTransaction();
    } finally {
      rollbackAndCleanup(committed, (Query)null);
    }
    return result;
  }
Getting MPartition object. Use this method only if the partition name is not available,
since then the table will be queried to get the partition keys.
@param catName The catalogue
@param dbName The database
@param tableName The table
@param part_vals The values defining the partition
@return The MPartition object in the backend database
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java