public int getAvailableSlots ( TaskType taskType ) { int availableSlots = 0 ; if ( taskType == TaskType . MAP ) { if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( trackerName + " getAvailSlots:" + " max(m)=" + status . getMaxMapSlots ( ) + " occupied(m)=" + status . countOccupiedMapSlots ( ) ) ; } availableSlots = status . getAvailableMapSlots ( ) ; } else { if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( trackerName + " getAvailSlots:" + " max(r)=" + status . getMaxReduceSlots ( ) + " occupied(r)=" + status . countOccupiedReduceSlots ( ) ) ; } availableSlots = status . getAvailableReduceSlots ( ) ; } return availableSlots ; }
Get the number of currently available slots on this tasktracker for the given type of the task .