Return-Path: Delivered-To: apmail-hadoop-common-commits-archive@www.apache.org Received: (qmail 95915 invoked from network); 29 Mar 2011 17:34:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 29 Mar 2011 17:34:00 -0000 Received: (qmail 87395 invoked by uid 500); 29 Mar 2011 17:34:00 -0000 Delivered-To: apmail-hadoop-common-commits-archive@hadoop.apache.org Received: (qmail 87297 invoked by uid 500); 29 Mar 2011 17:33:59 -0000 Mailing-List: contact common-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-dev@hadoop.apache.org Delivered-To: mailing list common-commits@hadoop.apache.org Received: (qmail 87290 invoked by uid 99); 29 Mar 2011 17:33:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Mar 2011 17:33:59 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Mar 2011 17:33:57 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id BC96C23888FD; Tue, 29 Mar 2011 17:33:37 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1086646 - in /hadoop/common/branches/branch-0.20-security-203: CHANGES.txt src/mapred/org/apache/hadoop/mapred/TaskTracker.java Date: Tue, 29 Mar 2011 17:33:37 -0000 To: common-commits@hadoop.apache.org From: omalley@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110329173337.BC96C23888FD@eris.apache.org> Author: omalley Date: Tue Mar 29 17:33:37 2011 New Revision: 1086646 URL: http://svn.apache.org/viewvc?rev=1086646&view=rev Log: MAPREDUCE-2355. Add a dampner to out-of-band heartbeats. (acmurthy) Modified: hadoop/common/branches/branch-0.20-security-203/CHANGES.txt hadoop/common/branches/branch-0.20-security-203/src/mapred/org/apache/hadoop/mapred/TaskTracker.java Modified: hadoop/common/branches/branch-0.20-security-203/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-203/CHANGES.txt?rev=1086646&r1=1086645&r2=1086646&view=diff ============================================================================== --- hadoop/common/branches/branch-0.20-security-203/CHANGES.txt (original) +++ hadoop/common/branches/branch-0.20-security-203/CHANGES.txt Tue Mar 29 17:33:37 2011 @@ -2,6 +2,8 @@ Hadoop Change Log Release 0.20.203.0 - unreleased + MAPREDUCE-2355. Add a dampner to out-of-band heartbeats. (acmurthy) + HADOOP-7190. Add metrics v1 back for backwards compatibility. (omalley) MAPREDUCE-2360. Remove stripping of scheme, authority from submit dir in Modified: hadoop/common/branches/branch-0.20-security-203/src/mapred/org/apache/hadoop/mapred/TaskTracker.java URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-203/src/mapred/org/apache/hadoop/mapred/TaskTracker.java?rev=1086646&r1=1086645&r2=1086646&view=diff ============================================================================== --- hadoop/common/branches/branch-0.20-security-203/src/mapred/org/apache/hadoop/mapred/TaskTracker.java (original) +++ hadoop/common/branches/branch-0.20-security-203/src/mapred/org/apache/hadoop/mapred/TaskTracker.java Tue Mar 29 17:33:37 2011 @@ -1426,25 +1426,21 @@ public class TaskTracker implements MRCo long now = System.currentTimeMillis(); // accelerate to account for multiple finished tasks up-front - long remaining = - (lastHeartbeat + getHeartbeatInterval(finishedCount.get())) - now; - while (remaining > 0) { - // sleeps for the wait time or - // until there are *enough* empty slots to schedule tasks - synchronized (finishedCount) { + synchronized (finishedCount) { + long remaining = + (lastHeartbeat + getHeartbeatInterval(finishedCount.get())) - now; + while (remaining > 0) { + // sleeps for the wait time or + // until there are *enough* empty slots to schedule tasks finishedCount.wait(remaining); - + // Recompute now = System.currentTimeMillis(); remaining = (lastHeartbeat + getHeartbeatInterval(finishedCount.get())) - now; - - if (remaining <= 0) { - // Reset count - finishedCount.set(0); - break; - } } + // Reset count + finishedCount.set(0); } // If the TaskTracker is just starting up: