瀏覽代碼

HADOOP-1293. Fix contrib/streaming to print more than the first twenty lines of stderr. Contributed by Koji.

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk@532871 13f79535-47bb-0310-9956-ffa450edef68
Doug Cutting 18 年之前
父節點
當前提交
b994698fee
共有 2 個文件被更改,包括 8 次插入9 次删除
  1. 5 2
      CHANGES.txt
  2. 3 7
      src/contrib/streaming/src/java/org/apache/hadoop/streaming/PipeMapRed.java

+ 5 - 2
CHANGES.txt

@@ -267,8 +267,11 @@ Trunk (unreleased changes)
     of field delimiter and fields for partitioning and sorting.
     (Runping Qi via cutting)
 
-80. HADOOP-1176.  Fix a bug where reduce would hang when a task
-    created more than 2GB of output for it.  (Arun C Murthy via cutting)
+80. HADOOP-1176.  Fix a bug where reduce would hang when a map had
+    more than 2GB of output for it.  (Arun C Murthy via cutting)
+
+81. HADOOP-1293.  Fix contrib/streaming to print more than the first
+    twenty lines of standard error.  (Koji Noguchi via cutting)
 
 
 Release 0.12.3 - 2007-04-06

+ 3 - 7
src/contrib/streaming/src/java/org/apache/hadoop/streaming/PipeMapRed.java

@@ -553,17 +553,13 @@ public abstract class PipeMapRed {
     public void run() {
       byte[] line;
       try {
-        long num = 0;
         while ((line = UTF8ByteArrayUtils.readLine((InputStream) clientErr_)) != null) {
-          num++;
           String lineStr = new String(line, "UTF-8");
-          logprintln(lineStr);
+          System.err.println(lineStr);
           long now = System.currentTimeMillis(); 
-          if (num < 20 || (now-lastStderrReport > reporterErrDelay_)) {
+          if (now-lastStderrReport > reporterErrDelay_) {
             lastStderrReport = now;
-            String hline = "MRErr: " + lineStr;
-            System.err.println(hline);
-            reporter.setStatus(hline);
+            reporter.progress();
           }
         }
       } catch (IOException io) {