hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 郭冲 <guochongh...@126.com>
Subject hadoop heartbeat interval
Date Thu, 15 Dec 2011 01:45:22 GMT
 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);
          }
        }
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message