code: private void killTask(TaskAttemptID tid, String msg, boolean wasFailure) {
      // Kill the task and mark it as killed.
      taskTracker.cleanUpOverMemoryTask(tid, wasFailure, msg);
      // Now destroy the ProcessTree, remove it from monitoring map.
      CGroupProcessTreeInfo ptInfo = processTreeInfoMap.get(tid);
      try {
        LinuxSystemCall.killProcessGroup(Integer.parseInt(ptInfo.getPID()));
      } catch (java.io.IOException e) {
        LOG.error("Could not kill process group " + ptInfo.getPID(), e);
      }
      processTreeInfoMap.remove(tid);
      LOG.info("Removed ProcessTree with root " + ptInfo.getPID());
    }
docs: Kill the task and clean up CGroupProcessTreeInfo
  @param tid task attempt ID of the task to be killed.
  @param msg diagonostic message
  @param wasFailure if true, fail the task