code: synchronized void addTrackerTaskFailure(String trackerName,
                                            TaskTracker taskTracker,
                                            String lastFailureReason) {
      if (flakyTaskTrackers < (clusterSize * CLUSTER_BLACKLIST_PERCENT)) {
        String trackerHostName = convertTrackerNameToHostName(trackerName);
  
        List<String> trackerFailures = trackerToFailuresMap.get(trackerHostName);
  
        if (trackerFailures == null) {
          trackerFailures = new LinkedList<String>();
          trackerToFailuresMap.put(trackerHostName, trackerFailures);
        }
        trackerFailures.add(lastFailureReason);
  
        // Check if this tasktracker has turned 'flaky'
        if (trackerFailures.size() == maxTaskFailuresPerTracker) {
          ++flakyTaskTrackers;
  
          // Cancel reservations if appropriate
          if (taskTracker != null) {
            if (trackersReservedForMaps.containsKey(taskTracker)) {
              taskTracker.unreserveSlots(TaskType.MAP, this);
            }
            if (trackersReservedForReduces.containsKey(taskTracker)) {
              taskTracker.unreserveSlots(TaskType.REDUCE, this);
            }
          }
          LOG.info("TaskTracker at '" + trackerHostName + "' turned 'flaky'");
        }
      }
    }
docs: Note that a task has failed on a given tracker and add the tracker
  to the blacklist iff too many trackers in the cluster i.e.
  (clusterSize * CLUSTER_BLACKLIST_PERCENT) haven't turned 'flaky' already.
  
  @param taskTracker task-tracker on which a task failed