int getMaxSlots ( String poolName , TaskType taskType ) { Map < String , Integer > maxMap = ( taskType == TaskType . MAP ? poolMaxMaps : poolMaxReduces ) ; if ( maxMap . containsKey ( poolName ) ) { return maxMap . get ( poolName ) ; } else { return Integer . MAX_VALUE ; } }
Get the maximum map or reduce slots for the given pool .