public void incRunningTasks ( String poolName , TaskType type , int inc ) { Map < String , Integer > runningMap = ( type == TaskType . MAP ? poolRunningMaps : poolRunningReduces ) ; if ( ! runningMap . containsKey ( poolName ) ) { runningMap . put ( poolName , 0 ) ; } int runningTasks = runningMap . get ( poolName ) + inc ; runningMap . put ( poolName , runningTasks ) ; }
Set the number of running tasks in a pool