code: private boolean isKillable(TaskAttemptID tid) {
      TaskInProgress tip = taskTracker.runningTasks.get(tid);
      return tip != null && !tip.wasKilled() &&
        (tip.getRunState() == TaskStatus.State.RUNNING ||
        tip.getRunState() == TaskStatus.State.COMMIT_PENDING);
    }
docs: Check if a task can be killed to increase free memory
  @param tid task attempt ID
  @return true if the task can be killed