Return-Path: X-Original-To: apmail-hadoop-mapreduce-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-mapreduce-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0568CFDBB for ; Fri, 25 Apr 2014 20:41:34 +0000 (UTC) Received: (qmail 94520 invoked by uid 500); 25 Apr 2014 20:41:25 -0000 Delivered-To: apmail-hadoop-mapreduce-issues-archive@hadoop.apache.org Received: (qmail 94283 invoked by uid 500); 25 Apr 2014 20:41:21 -0000 Mailing-List: contact mapreduce-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mapreduce-issues@hadoop.apache.org Delivered-To: mailing list mapreduce-issues@hadoop.apache.org Received: (qmail 94020 invoked by uid 99); 25 Apr 2014 20:41:18 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Apr 2014 20:41:18 +0000 Date: Fri, 25 Apr 2014 20:41:18 +0000 (UTC) From: "Ted Yu (JIRA)" To: mapreduce-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (MAPREDUCE-5861) LocalContainerLauncher does not atomically update volatile variable finishedSubMaps MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Ted Yu created MAPREDUCE-5861: --------------------------------- Summary: LocalContainerLauncher does not atomically update volatile variable finishedSubMaps Key: MAPREDUCE-5861 URL: https://issues.apache.org/jira/browse/MAPREDUCE-5861 Project: Hadoop Map/Reduce Issue Type: Bug Reporter: Ted Yu Priority: Minor Around line 374: {code} if (++finishedSubMaps == numMapTasks) { doneWithMaps = true; } {code} The increment of finishedSubMaps is not atomic. See the answer to http://stackoverflow.com/questions/9749746/what-is-the-difference-of-atomic-volatile-synchronize . AtomicInteger can be used to achieve atomicity. -- This message was sent by Atlassian JIRA (v6.2#6252)