code: private void removeTaskTrackerCapacity(TaskTrackerStatus status) {
      Integer mapSlots = trackerNameToMapSlots.remove(status.getTrackerName());
      if (mapSlots == null) {
        mapSlots = 0;
      }
      totalMapTaskCapacity -= mapSlots;
  
      Integer reduceSlots = trackerNameToReduceSlots.remove(status.getTrackerName());
      if (reduceSlots == null) {
        reduceSlots = 0;
      }
      totalReduceTaskCapacity -= reduceSlots;
  
      LOG.info("Removing " + mapSlots + " map slots, " + reduceSlots +
               " reduce slots due to " + status.getTrackerName() +
               ", totalMap = " + totalMapTaskCapacity + ", totalReduce = " + totalReduceTaskCapacity);
    }
docs: Update totalMapTaskCapacity and totalReduceTaskCapacity for removing
  a tasktracker
  
  @param status The status of the tasktracker