void setPhase ( Phase phase ) { TaskStatus . Phase oldPhase = getPhase ( ) ; if ( oldPhase != phase ) { // sort phase started if ( phase == TaskStatus . Phase . SORT ) { setShuffleFinishTime ( JobTracker . getClock ( ) . getTime ( ) ) ; } else if ( phase == TaskStatus . Phase . REDUCE ) { setSortFinishTime ( JobTracker . getClock ( ) . getTime ( ) ) ; } } this . phase = phase ; }
Set current phase of this task .