code: @Override
    synchronized boolean processHeartbeat(TaskTrackerStatus trackerStatus,
        boolean initialContact) {
      boolean loggingEnabled = LOG.isDebugEnabled();
      String trackerName = trackerStatus.getTrackerName();
      boolean seenBefore = updateTaskTrackerStatus(trackerName, trackerStatus);
      TaskTracker taskTracker = getTaskTracker(trackerName);
      // update the status of the task tracker. Also updates all aggregate
      // statistics
      if (loggingEnabled) {
        LOG.debug("processing heartbeat for " + trackerName);
        LOG.debug("updating TaskTracker status for " + trackerName);
      }
      if (initialContact) {
        // If it's first contact, then clear out 
        // any state hanging around
        if (seenBefore) {
          lostTaskTracker(taskTracker);
        }
      } else {
        // If not first contact, there should be some record of the tracker
        if (!seenBefore) {
          LOG.warn("Status from unknown Tracker : " + trackerName);
          updateTaskTrackerStatus(trackerName, null);
          return false;
        }
      }
  
      if (initialContact) {
        if (loggingEnabled) {
          LOG.debug("adding new tracker name = " + trackerName);
        }
        addNewTracker(taskTracker);
      }
  
      if (loggingEnabled) {
        LOG.debug("updating TaskStatus for " + trackerName);
      }
      // update status of all tasks from heartbeat
      updateTaskStatuses(trackerStatus);
  
      return true;
    }
docs: //////////////////////////////////////////////////