code: synchronized void cleanUpOverMemoryTask(TaskAttemptID tid, boolean wasFailure,
        String diagnosticMsg) {
      TaskInProgress tip = runningTasks.get(tid);
      if (tip != null) {
        tip.reportDiagnosticInfo(diagnosticMsg);
        try {
          purgeTask(tip, wasFailure); // Marking it as failed/killed.
        } catch (IOException ioe) {
          LOG.warn("Couldn't purge the task of " + tid + ". Error : " + ioe);
        }
      }
    }
docs: Clean-up the task that TaskMemoryMangerThread requests to do so.
  @param tid
  @param wasFailure mark the task as failed or killed. 'failed' if true,
  'killed' otherwise
  @param diagnosticMsg