Return-Path: Delivered-To: apmail-lucene-hadoop-commits-archive@locus.apache.org Received: (qmail 2727 invoked from network); 12 Oct 2007 21:37:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Oct 2007 21:37:11 -0000 Received: (qmail 9748 invoked by uid 500); 12 Oct 2007 21:10:18 -0000 Delivered-To: apmail-lucene-hadoop-commits-archive@lucene.apache.org Received: (qmail 9718 invoked by uid 500); 12 Oct 2007 21:10:18 -0000 Mailing-List: contact hadoop-commits-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hadoop-dev@lucene.apache.org Delivered-To: mailing list hadoop-commits@lucene.apache.org Received: (qmail 9709 invoked by uid 99); 12 Oct 2007 21:10:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Oct 2007 14:10:18 -0700 X-ASF-Spam-Status: No, hits=-100.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, 12 Oct 2007 21:10:21 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 938E81A9832; Fri, 12 Oct 2007 14:09:58 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r584273 - in /lucene/hadoop/trunk: CHANGES.txt src/contrib/streaming/src/java/org/apache/hadoop/streaming/PipeMapRed.java Date: Fri, 12 Oct 2007 21:08:52 -0000 To: hadoop-commits@lucene.apache.org From: nigel@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20071012211000.938E81A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: nigel Date: Fri Oct 12 14:07:50 2007 New Revision: 584273 URL: http://svn.apache.org/viewvc?rev=584273&view=rev Log: HADOOP-1771. Fix a NullPointerException in streaming caused by an IOException in MROutputThread. Contributed by lohit. Modified: lucene/hadoop/trunk/CHANGES.txt lucene/hadoop/trunk/src/contrib/streaming/src/java/org/apache/hadoop/streaming/PipeMapRed.java Modified: lucene/hadoop/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?rev=584273&r1=584272&r2=584273&view=diff ============================================================================== --- lucene/hadoop/trunk/CHANGES.txt (original) +++ lucene/hadoop/trunk/CHANGES.txt Fri Oct 12 14:07:50 2007 @@ -291,6 +291,9 @@ remain in the RUNNING state even after being killed by the JobTracker and thus handicap the cleanup of the task's output sub-directory. (acmurthy) + HADOOP-1771. Fix a NullPointerException in streaming caused by an + IOException in MROutputThread. (lohit vijayarenu via nigel) + IMPROVEMENTS HADOOP-1908. Restructure data node code so that block sending and Modified: lucene/hadoop/trunk/src/contrib/streaming/src/java/org/apache/hadoop/streaming/PipeMapRed.java URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/streaming/src/java/org/apache/hadoop/streaming/PipeMapRed.java?rev=584273&r1=584272&r2=584273&view=diff ============================================================================== --- lucene/hadoop/trunk/src/contrib/streaming/src/java/org/apache/hadoop/streaming/PipeMapRed.java (original) +++ lucene/hadoop/trunk/src/contrib/streaming/src/java/org/apache/hadoop/streaming/PipeMapRed.java Fri Oct 12 14:07:50 2007 @@ -353,13 +353,23 @@ logflush(); } } - } catch (IOException io) { - io.printStackTrace(log_); - outerrThreadsThrowable = io; + if (clientIn_ != null) { + clientIn_.close(); + clientIn_ = null; + LOG.info("MROutputThread done"); + } } catch (Throwable th) { outerrThreadsThrowable = th; + LOG.warn(StringUtils.stringifyException(th)); + try { + if (clientIn_ != null) { + clientIn_.close(); + clientIn_ = null; + } + } catch (IOException io) { + LOG.info(StringUtils.stringifyException(io)); + } } - logprintln("MROutputThread done"); } OutputCollector output; @@ -388,11 +398,22 @@ reporter.progress(); } } - } catch (IOException io) { - logStackTrace(io); - outerrThreadsThrowable = io; + if (clientErr_ != null) { + clientErr_.close(); + clientErr_ = null; + LOG.info("MRErrorThread done"); + } } catch (Throwable th) { outerrThreadsThrowable = th; + LOG.warn(StringUtils.stringifyException(th)); + try { + if (clientErr_ != null) { + clientErr_.close(); + clientErr_ = null; + } + } catch (IOException io) { + LOG.info(StringUtils.stringifyException(io)); + } } } long lastStderrReport = 0;