Return-Path: Delivered-To: apmail-hadoop-core-commits-archive@www.apache.org Received: (qmail 90366 invoked from network); 11 Apr 2008 12:41:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Apr 2008 12:41:37 -0000 Received: (qmail 86278 invoked by uid 500); 11 Apr 2008 12:41:37 -0000 Delivered-To: apmail-hadoop-core-commits-archive@hadoop.apache.org Received: (qmail 86257 invoked by uid 500); 11 Apr 2008 12:41:37 -0000 Mailing-List: contact core-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: core-dev@hadoop.apache.org Delivered-To: mailing list core-commits@hadoop.apache.org Received: (qmail 86248 invoked by uid 99); 11 Apr 2008 12:41:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Apr 2008 05:41:37 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Apr 2008 12:41:04 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id B19221A9832; Fri, 11 Apr 2008 05:41:16 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r647146 - in /hadoop/core/branches/branch-0.17: CHANGES.txt src/java/org/apache/hadoop/mapred/ReduceTask.java Date: Fri, 11 Apr 2008 12:41:15 -0000 To: core-commits@hadoop.apache.org From: ddas@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080411124116.B19221A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: ddas Date: Fri Apr 11 05:41:11 2008 New Revision: 647146 URL: http://svn.apache.org/viewvc?rev=647146&view=rev Log: Merge -r 647143:647144 from trunk onto 0.17 branch. Fixes HADOOP-3204. Modified: hadoop/core/branches/branch-0.17/CHANGES.txt hadoop/core/branches/branch-0.17/src/java/org/apache/hadoop/mapred/ReduceTask.java Modified: hadoop/core/branches/branch-0.17/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.17/CHANGES.txt?rev=647146&r1=647145&r2=647146&view=diff ============================================================================== --- hadoop/core/branches/branch-0.17/CHANGES.txt (original) +++ hadoop/core/branches/branch-0.17/CHANGES.txt Fri Apr 11 05:41:11 2008 @@ -553,6 +553,9 @@ HADOOP-1373. checkPath() should ignore case when it compares authoriy. (Edward J. Yoon via rangadi) + HADOOP-3204. Fixes a problem to do with ReduceTask's LocalFSMerger not + catching Throwable. (Amar Ramesh Kamat via ddas) + Release 0.16.3 - Unreleased BUG FIXES Modified: hadoop/core/branches/branch-0.17/src/java/org/apache/hadoop/mapred/ReduceTask.java URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.17/src/java/org/apache/hadoop/mapred/ReduceTask.java?rev=647146&r1=647145&r2=647146&view=diff ============================================================================== --- hadoop/core/branches/branch-0.17/src/java/org/apache/hadoop/mapred/ReduceTask.java (original) +++ hadoop/core/branches/branch-0.17/src/java/org/apache/hadoop/mapred/ReduceTask.java Fri Apr 11 05:41:11 2008 @@ -1380,6 +1380,10 @@ LOG.warn(reduceTask.getTaskId() + " Final merge of the inmemory files threw an exception: " + StringUtils.stringifyException(t)); + // check if the last merge generated an error + if (mergeThrowable != null) { + mergeThrowable = t; + } return false; } } @@ -1548,9 +1552,15 @@ .suffix(".merged"); SequenceFile.Writer writer = sorter.cloneFileAttributes(mapFiles[0], outputPath, null); - SequenceFile.Sorter.RawKeyValueIterator iter; + SequenceFile.Sorter.RawKeyValueIterator iter = null; Path tmpDir = new Path(reduceTask.getTaskId()); - iter = sorter.merge(mapFiles, true, ioSortFactor, tmpDir); + try { + iter = sorter.merge(mapFiles, true, ioSortFactor, tmpDir); + } catch (Exception e) { + writer.close(); + localFileSys.delete(outputPath, true); + throw new IOException (StringUtils.stringifyException(e)); + } sorter.writeFile(iter, writer); writer.close(); @@ -1560,12 +1570,12 @@ LOG.info(reduceTask.getTaskId() + " Finished merging map output files on disk."); - } catch (IOException ioe) { + } catch (Throwable t) { LOG.warn(reduceTask.getTaskId() + " Merging of the local FS files threw an exception: " - + StringUtils.stringifyException(ioe)); + + StringUtils.stringifyException(t)); if (mergeThrowable == null) { - mergeThrowable = ioe; + mergeThrowable = t; } } finally { localFSMergeInProgress = false;