code: public int getAvailableSlots(TaskType taskType) {
      int availableSlots = 0;
      if (taskType == TaskType.MAP) {
        if (LOG.isDebugEnabled()) {
          LOG.debug(trackerName + " getAvailSlots:" +
          		     " max(m)=" + status.getMaxMapSlots() + 
          		     " occupied(m)=" + status.countOccupiedMapSlots());
        }
        availableSlots = status.getAvailableMapSlots();
      } else {
        if (LOG.isDebugEnabled()) {
          LOG.debug(trackerName + " getAvailSlots:" +
                    " max(r)=" + status.getMaxReduceSlots() + 
                    " occupied(r)=" + status.countOccupiedReduceSlots());
        }
        availableSlots = status.getAvailableReduceSlots();
      }
      return availableSlots;
    }
docs: Get the number of currently available slots on this tasktracker for the
  given type of the task.
  @param taskType the {@link TaskType} to check for number of available slots
  @return the number of currently available slots for the given
  <code>taskType</code>