code: void incrementReservations(TaskType type, int reservedSlots) {
      if (type.equals(TaskType.MAP)) {
        reservedMapSlots += reservedSlots;
      } else if (type.equals(TaskType.REDUCE)) {
        reservedReduceSlots += reservedSlots;
      }
    }
docs: This method assumes the caller has JobTracker lock.