You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by 郭冲 <gu...@126.com> on 2011/12/15 02:45:22 UTC

hadoop heartbeat interval

 in TaskTracker.offerService()  i see "sleeps for the wait time or until there are empty slots to schedule tasks",  does the taskTracker sent heartbeat every n seconds (if i set the interval is n) ?  if the taskTracker has empty slots but the interval between now and the last heartbeat is less than n , what will the taskTracker do?

long waitTime = heartbeatInterval - (now - lastHeartbeat);
        if (waitTime > 0) {
          // sleeps for the wait time or
          // until there are empty slots to schedule tasks
          synchronized (finishedCount) {
            if (finishedCount.get() == 0) {
              finishedCount.wait(waitTime);
            }
            finishedCount.set(0);
          }
        }