code: int getMaxSlots(String poolName, TaskType taskType) {
      Map<String, Integer> maxMap = (taskType == TaskType.MAP ?
                                     poolMaxMaps : poolMaxReduces);
      if (maxMap.containsKey(poolName)) {
        return maxMap.get(poolName);
      } else {
        return Integer.MAX_VALUE;
      }
    }
docs: Get the maximum map or reduce slots for the given pool.
  @return the cap set on this pool, or Integer.MAX_VALUE if not set.