code: public boolean checkMinimumSlotsAvailable(
        ClusterStatus clusterStatus, TaskType type) {
      Map<String, Integer> poolToMinSlots = (type == TaskType.MAP) ?
          mapAllocs : reduceAllocs;
      int totalSlots = (type == TaskType.MAP) ?
          clusterStatus.getMaxMapTasks() : clusterStatus.getMaxReduceTasks();
      int totalMinSlots = 0;
      for (int minSlots : poolToMinSlots.values()) {
        totalMinSlots += minSlots;
      }
      if (totalMinSlots > totalSlots) {
        LOG.warn(String.format(
            "Bad minimum %s slot configuration. cluster:%s totalMinSlots:%s",
            type, totalSlots, totalMinSlots));
        return false;
      }
      LOG.info(String.format(
          "Minimum %s slots checked. cluster:%s totalMinSlots:%s",
          type, totalSlots, totalSlots));
      return true;
    }
docs: Check if the minimum slots set in the configuration is feasible
  @param clusterStatus The current status of the JobTracker
  @param type The type of the task to check
  @return true if the check is passed