code: private int occupiedSlotsAfterHeartbeat(
        TaskTrackerStatus tts, TaskType type) {
      int occupied = (type == TaskType.MAP) ?
          tts.countOccupiedMapSlots() - tts.getMapsReleased() :
          tts.countOccupiedReduceSlots() - tts.getReducesReleased();
      return occupied;
    }
docs: Obtain the number of occupied slots after the scheduled kills are done
  @param tts The status of the tasktracker
  @param type The type of the task
  @return the number of occupied slots after kill actions