private static void validateDynPartitionCount(Configuration conf, Collection<Path> partitions) throws HiveException {
    int partsToLoad = partitions.size();
    int maxPartition = HiveConf.getIntVar(conf, HiveConf.ConfVars.DYNAMIC_PARTITION_MAX_PARTS);
    if (partsToLoad > maxPartition) {
      throw new HiveException("Number of dynamic partitions created is " + partsToLoad
          + ", which is more than "
          + maxPartition
          +". To solve this try to set " + HiveConf.ConfVars.DYNAMIC_PARTITION_MAX_PARTS.varname
          + " to at least " + partsToLoad + '.');
    }
  }
Construct a list of full partition spec from Dynamic Partition Context and the directory names
corresponding to these dynamic partitions.
ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java