Skip to content

Commit

Permalink
MAPREDUCE-5642. TestMiniMRChildTask fails on Windows. Contributed by …
Browse files Browse the repository at this point in the history
…Chuan Liu.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1588605 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
cnauroth committed Apr 19, 2014
1 parent d667df4 commit c482cb2
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
3 changes: 3 additions & 0 deletions hadoop-mapreduce-project/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ Release 2.5.0 - UNRELEASED
MAPREDUCE-4937. MR AM handles an oversized split metainfo file poorly
(Eric Payne via jlowe)

MAPREDUCE-5642. TestMiniMRChildTask fails on Windows.
(Chuan Liu via cnauroth)

Release 2.4.1 - UNRELEASED

INCOMPATIBLE CHANGES
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,19 @@ public void configure(JobConf job) {
checkEnv("NEW_PATH", File.pathSeparator + "/tmp", "noappend");
// check if X=$(tt's X var):/tmp for an old env variable inherited from
// the tt
if (Shell.WINDOWS) {
// On Windows, PATH is replaced one more time as part of default config
// of "mapreduce.admin.user.env", i.e. on Windows,
// "mapreduce.admin.user.env" is set to
// "PATH=%PATH%;%HADOOP_COMMON_HOME%\\bin"
String hadoopHome = System.getenv("HADOOP_COMMON_HOME");
if (hadoopHome == null) {
hadoopHome = "";
}
String hadoopLibLocation = hadoopHome + "\\bin";
path += File.pathSeparator + hadoopLibLocation;
path += File.pathSeparator + path;
}
checkEnv("PATH", path + File.pathSeparator + "/tmp", "noappend");

String jobLocalDir = job.get(MRJobConfig.JOB_LOCAL_DIR);
Expand Down Expand Up @@ -308,6 +321,19 @@ public void configure(JobConf job) {
checkEnv("NEW_PATH", File.pathSeparator + "/tmp", "noappend");
// check if X=$(tt's X var):/tmp for an old env variable inherited from
// the tt
if (Shell.WINDOWS) {
// On Windows, PATH is replaced one more time as part of default config
// of "mapreduce.admin.user.env", i.e. on Windows,
// "mapreduce.admin.user.env"
// is set to "PATH=%PATH%;%HADOOP_COMMON_HOME%\\bin"
String hadoopHome = System.getenv("HADOOP_COMMON_HOME");
if (hadoopHome == null) {
hadoopHome = "";
}
String hadoopLibLocation = hadoopHome + "\\bin";
path += File.pathSeparator + hadoopLibLocation;
path += File.pathSeparator + path;
}
checkEnv("PATH", path + File.pathSeparator + "/tmp", "noappend");

}
Expand Down

0 comments on commit c482cb2

Please sign in to comment.