Return-Path: X-Original-To: apmail-hadoop-mapreduce-dev-archive@minotaur.apache.org Delivered-To: apmail-hadoop-mapreduce-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BC68F64DA for ; Wed, 18 May 2011 15:50:28 +0000 (UTC) Received: (qmail 41308 invoked by uid 500); 18 May 2011 15:50:28 -0000 Delivered-To: apmail-hadoop-mapreduce-dev-archive@hadoop.apache.org Received: (qmail 41250 invoked by uid 500); 18 May 2011 15:50:28 -0000 Mailing-List: contact mapreduce-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mapreduce-dev@hadoop.apache.org Delivered-To: mailing list mapreduce-dev@hadoop.apache.org Received: (qmail 41242 invoked by uid 99); 18 May 2011 15:50:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 May 2011 15:50:27 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 May 2011 15:50:26 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 5C6AACF41E for ; Wed, 18 May 2011 15:49:47 +0000 (UTC) Date: Wed, 18 May 2011 15:49:47 +0000 (UTC) From: "Devaraj K (JIRA)" To: mapreduce-dev@hadoop.apache.org Message-ID: <1304283840.22719.1305733787374.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Created] (MAPREDUCE-2512) wait(5000) and notify() mechanism can be implemented instead of sleep(5000) in reduce task when there are no copies in progress and no new copies to schedule MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 wait(5000) and notify() mechanism can be implemented instead of sleep(5000) in reduce task when there are no copies in progress and no new copies to schedule ------------------------------------------------------------------------------------------------------------------------------------------------------------- Key: MAPREDUCE-2512 URL: https://issues.apache.org/jira/browse/MAPREDUCE-2512 Project: Hadoop Map/Reduce Issue Type: Improvement Components: task Affects Versions: 0.20.2 Reporter: Devaraj K Assignee: Devaraj K {code:title=ReduceTask.java|borderStyle=solid} try { if (numInFlight == 0 && numScheduled == 0) { // we should indicate progress as we don't want TT to think // we're stuck and kill us reporter.progress(); Thread.sleep(5000); } } catch (InterruptedException e) { } // IGNORE {code} Here if we have no copies in flight and we can't schedule anything new, it is going to wait for 5000 millis. Instead of waiting for 5000 millis, this thread can wait with timeout and GetMapEventsThread can notify it if gets new map completion events earlier than 5000 millis time. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira