hive-protolib/src/main/java/com/streamsets/pipeline/stage/lib/hive/HiveMetastoreUtil.java
public static void validatePartitionInformation(
      TypeInfoCacheSupport.TypeInfo typeInfo,
      LinkedHashMap<String, String> partitionValMap,
      String qualifiedTableName
  ) throws HiveStageCheckedException {
    Set<String> partitionNamesInHive = typeInfo.getPartitionTypeInfo().keySet();
    Set<String> partitionNames = partitionValMap.keySet();
    if (!(partitionNamesInHive.size() == partitionNames.size()
        && partitionNamesInHive.containsAll(partitionNames))) {
      LOG.error(Utils.format(
          "Partition mismatch. In Hive: {}, In Record : {}",
          partitionNamesInHive.size(),
          partitionNames.size())
      );
      throw new HiveStageCheckedException(Errors.HIVE_27, qualifiedTableName);
    }
  }
public static void validatePartitionInformation(
      TypeInfoCacheSupport.TypeInfo typeInfo,
      LinkedHashMap<String, String> partitionValMap,
      String qualifiedTableName
  ) throws HiveStageCheckedException {
    Set<String> partitionNamesInHive = typeInfo.getPartitionTypeInfo().keySet();
    Set<String> partitionNames = partitionValMap.keySet();
    if (!(partitionNamesInHive.size() == partitionNames.size()
        && partitionNamesInHive.containsAll(partitionNames))) {
      LOG.error(Utils.format(
          "Partition mismatch. In Hive: {}, In Record : {}",
          partitionNamesInHive.size(),
          partitionNames.size())
      );
      throw new HiveStageCheckedException(Errors.HIVE_27, qualifiedTableName);
    }
  }
Checks whether the number of partition columns and names match w.r.t hive.
@param typeInfo {@link com.streamsets.pipeline.stage.lib.hive.cache.TypeInfoCacheSupport.TypeInfo}
@param partitionValMap Map of partition name to values
@param qualifiedTableName Qualified table name.
@throws HiveStageCheckedException if there is a mismatch w.r.t hive