private void purgeTask(TaskInProgress tip, boolean wasFailure)
  throws IOException {
    if (tip != null) {
      LOG.info("About to purge task: " + tip.getTask().getTaskID());

      // Remove the task from running jobs,
      // removing the job if it's the last task
      removeTaskFromJob(tip.getTask().getJobID(), tip);
      tip.jobHasFinished(wasFailure);
      if (tip.getTask().isMapTask()) {
        indexCache.removeMap(tip.getTask().getTaskID().toString());
      }
    }
  }
private void purgeTask ( TaskInProgress tip , boolean wasFailure ) throws IOException { if ( tip != null ) { LOG . info ( "About to purge task: " + tip . getTask ( ) . getTaskID ( ) ) ; removeTaskFromJob ( tip . getTask ( ) . getJobID ( ) , tip ) ; tip . jobHasFinished ( wasFailure ) ; if ( tip . getTask ( ) . isMapTask ( ) ) { indexCache . removeMap ( tip . getTask ( ) . getTaskID ( ) . toString ( ) ) ; } } }
Remove the tip and update all relevant state.

@param tip {@link TaskInProgress} to be removed.
@param wasFailure did the task fail or was it killed?