public TaskInProgress getTaskInProgress ( TaskID tipid ) { if ( tipid . isMap ( ) ) { if ( cleanup . length > 0 && tipid . equals ( cleanup [ 0 ] . getTIPId ( ) ) ) { // cleanup map tip return cleanup [ 0 ] ; } if ( setup . length > 0 && tipid . equals ( setup [ 0 ] . getTIPId ( ) ) ) { //setup map tip return setup [ 0 ] ; } for ( int i = 0 ; i < maps . length ; i ++ ) { if ( tipid . equals ( maps [ i ] . getTIPId ( ) ) ) { return maps [ i ] ; } } } else { if ( cleanup . length > 0 && tipid . equals ( cleanup [ 1 ] . getTIPId ( ) ) ) { // cleanup reduce tip return cleanup [ 1 ] ; } if ( setup . length > 0 && tipid . equals ( setup [ 1 ] . getTIPId ( ) ) ) { //setup reduce tip return setup [ 1 ] ; } for ( int i = 0 ; i < reduces . length ; i ++ ) { if ( tipid . equals ( reduces [ i ] . getTIPId ( ) ) ) { return reduces [ i ] ; } } } return null ; }
Return the TaskInProgress that matches the tipid .