code: private int getTotalSlots(
        TaskTrackerStatus status, TaskType type) {
      Map<Integer, Integer> defaultCpuToMaxSlots = (type == TaskType.MAP) ?
          defaultCpuToMaxMapSlots : defaultCpuToMaxReduceSlots;
      int cpus = status.getResourceStatus().getNumProcessors();
      Integer slots = defaultCpuToMaxSlots.get(cpus);
      if (slots == null) {
        slots = (type == TaskType.MAP) ?
            defaultMaxMapSlots : defaultMaxReduceSlots;
      }
      int taskTrackerSlots = (type == TaskType.MAP) ? status.getMaxMapSlots() :
          status.getMaxReduceSlots();
      return Math.min(slots, taskTrackerSlots);
    }
docs: Obtain the two clusters combined total slots of a tasktracker