private void removeHostCapacity(String hostName) { synchronized (taskTrackers) { // remove the capacity of trackers on this host int numTrackersOnHost = 0; for (TaskTrackerStatus status : getStatusesOnHost(hostName)) { updateTotalTaskCapacity(status); removeTaskTrackerCapacity(status); int mapSlots = taskScheduler.getMaxSlots(status, TaskType.MAP); int reduceSlots = taskScheduler.getMaxSlots(status, TaskType.REDUCE); ++numTrackersOnHost; getInstrumentation().addBlackListedMapSlots( mapSlots); getInstrumentation().addBlackListedReduceSlots( reduceSlots); } uniqueHostsMap.remove(hostName); incrBlackListedTrackers(numTrackersOnHost); } }
private void removeHostCapacity(String hostName) { synchronized (taskTrackers) { // remove the capacity of trackers on this host int numTrackersOnHost = 0; for (TaskTrackerStatus status : getStatusesOnHost(hostName)) { int mapSlots = status.getMaxMapSlots(); totalMapTaskCapacity -= mapSlots; int reduceSlots = status.getMaxReduceSlots(); totalReduceTaskCapacity -= reduceSlots; ++numTrackersOnHost; getInstrumentation().addBlackListedMapSlots( mapSlots); getInstrumentation().addBlackListedReduceSlots( reduceSlots); } // remove the host uniqueHostsMap.remove(hostName); incrBlackListedTrackers(numTrackersOnHost); } }