hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jl...@apache.org
Subject svn commit: r1425177 - /hadoop/common/trunk/hadoop-tools/hadoop-streaming/src/main/java/org/apache/hadoop/streaming/StreamJob.java
Date Fri, 21 Dec 2012 23:05:55 GMT
Author: jlowe
Date: Fri Dec 21 23:05:54 2012
New Revision: 1425177

URL: http://svn.apache.org/viewvc?rev=1425177&view=rev
Log:
MAPREDUCE-4793. Problem with adding resources when using both -files and -file to hadoop streaming.
Contributed by Jason Lowe

Modified:
    hadoop/common/trunk/hadoop-tools/hadoop-streaming/src/main/java/org/apache/hadoop/streaming/StreamJob.java

Modified: hadoop/common/trunk/hadoop-tools/hadoop-streaming/src/main/java/org/apache/hadoop/streaming/StreamJob.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-tools/hadoop-streaming/src/main/java/org/apache/hadoop/streaming/StreamJob.java?rev=1425177&r1=1425176&r2=1425177&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-tools/hadoop-streaming/src/main/java/org/apache/hadoop/streaming/StreamJob.java
(original)
+++ hadoop/common/trunk/hadoop-tools/hadoop-streaming/src/main/java/org/apache/hadoop/streaming/StreamJob.java
Fri Dec 21 23:05:54 2012
@@ -306,7 +306,13 @@ public class StreamJob implements Tool {
             throw new IllegalArgumentException(e);
           }
         }
-        config_.set("tmpfiles", config_.get("tmpfiles", "") + fileList);
+        String tmpFiles = config_.get("tmpfiles", "");
+        if (tmpFiles.isEmpty()) {
+          tmpFiles = fileList.toString();
+        } else {
+          tmpFiles = tmpFiles + "," + fileList;
+        }
+        config_.set("tmpfiles", tmpFiles);
         validate(packageFiles_);
       }
 



Mime
View raw message