Skip to content

Commit 915d030

Browse files
committed
MAPREDUCE-4793. Problem with adding resources when using both -files and -file to hadoop streaming. Contributed by Jason Lowe
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1425177 13f79535-47bb-0310-9956-ffa450edef68
1 parent 00c3dc4 commit 915d030

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

hadoop-mapreduce-project/CHANGES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,9 @@ Release 0.23.6 - UNRELEASED
635635
MAPREDUCE-4833. Task can get stuck in FAIL_CONTAINER_CLEANUP (Robert
636636
Parker via jlowe)
637637

638+
MAPREDUCE-4793. Problem with adding resources when using both -files and
639+
-file to hadoop streaming (jlowe)
640+
638641
Release 0.23.5 - UNRELEASED
639642

640643
INCOMPATIBLE CHANGES

hadoop-tools/hadoop-streaming/src/main/java/org/apache/hadoop/streaming/StreamJob.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,13 @@ void parseArgv() {
306306
throw new IllegalArgumentException(e);
307307
}
308308
}
309-
config_.set("tmpfiles", config_.get("tmpfiles", "") + fileList);
309+
String tmpFiles = config_.get("tmpfiles", "");
310+
if (tmpFiles.isEmpty()) {
311+
tmpFiles = fileList.toString();
312+
} else {
313+
tmpFiles = tmpFiles + "," + fileList;
314+
}
315+
config_.set("tmpfiles", tmpFiles);
310316
validate(packageFiles_);
311317
}
312318

0 commit comments

Comments
 (0)