Sfoglia il codice sorgente

HADOOP-1596. Fix the parsing of taskids in streaming.

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk@555649 13f79535-47bb-0310-9956-ffa450edef68
Owen O'Malley 18 anni fa
parent
commit
da8fd8e17e

+ 2 - 0
CHANGES.txt

@@ -325,6 +325,8 @@ Trunk (unreleased changes)
 100. HADOOP-1590.  Use relative urls in jobtracker jsp pages, so that
      webapp can be used in non-root contexts.  (Thomas Friol via cutting)
 
+101. HADOOP-1596.  Fix the parsing of taskids by streaming and improve the
+     error reporting. (omalley)
 
 Release 0.13.0 - 2007-06-08
 

+ 2 - 0
src/contrib/streaming/src/java/org/apache/hadoop/streaming/PipeMapRed.java

@@ -177,6 +177,8 @@ public abstract class PipeMapRed {
 
     } catch (Exception e) {
       logStackTrace(e);
+      LOG.error("configuration exception", e);
+      throw new RuntimeException("configuration exception", e);
     }
   }
 

+ 4 - 4
src/contrib/streaming/src/java/org/apache/hadoop/streaming/StreamUtil.java

@@ -446,10 +446,10 @@ public class StreamUtil {
       res.execid = 0;
     } else {
       String[] e = id.split("_");
-      res.mapTask = e[2].equals("m");
-      res.jobid = e[1];
-      res.taskid = Integer.parseInt(e[3]);
-      res.execid = Integer.parseInt(e[4]);
+      res.mapTask = e[3].equals("m");
+      res.jobid = e[1] + "_" + e[2];
+      res.taskid = Integer.parseInt(e[4]);
+      res.execid = Integer.parseInt(e[5]);
     }
     return res;
   }