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); } }