MAPREDUCE-3854. Fixed and reenabled tests related to MR child JVM's environmental variables in TestMiniMRChildTask. (Tom White via vinodkv)
svn merge --ignore-ancestry -c 1244223 ../../trunk/ git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1244224 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6fe9bd2e68
commit
d606016217
|
@ -8,6 +8,9 @@ Release 0.23.2 - UNRELEASED
|
||||||
|
|
||||||
IMPROVEMENTS
|
IMPROVEMENTS
|
||||||
|
|
||||||
|
MAPREDUCE-3854. Fixed and reenabled tests related to MR child JVM's
|
||||||
|
environmental variables in TestMiniMRChildTask. (Tom White via vinodkv)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
BUG FIXES
|
BUG FIXES
|
||||||
|
|
|
@ -219,8 +219,8 @@ public class TestMiniMRChildTask {
|
||||||
|
|
||||||
// check if X=$X:/abc works for LD_LIBRARY_PATH
|
// check if X=$X:/abc works for LD_LIBRARY_PATH
|
||||||
checkEnv("LD_LIBRARY_PATH", "/tmp", "append");
|
checkEnv("LD_LIBRARY_PATH", "/tmp", "append");
|
||||||
// check if X=/tmp works for an already existing parameter
|
// check if X=y works for an already existing parameter
|
||||||
checkEnv("HOME", "/tmp", "noappend");
|
checkEnv("LANG", "en_us_8859_1", "noappend");
|
||||||
// check if X=/tmp for a new env variable
|
// check if X=/tmp for a new env variable
|
||||||
checkEnv("MY_PATH", "/tmp", "noappend");
|
checkEnv("MY_PATH", "/tmp", "noappend");
|
||||||
// check if X=$X:/tmp works for a new env var and results into :/tmp
|
// check if X=$X:/tmp works for a new env var and results into :/tmp
|
||||||
|
@ -269,8 +269,8 @@ public class TestMiniMRChildTask {
|
||||||
|
|
||||||
// check if X=$X:/abc works for LD_LIBRARY_PATH
|
// check if X=$X:/abc works for LD_LIBRARY_PATH
|
||||||
checkEnv("LD_LIBRARY_PATH", "/tmp", "append");
|
checkEnv("LD_LIBRARY_PATH", "/tmp", "append");
|
||||||
// check if X=/tmp works for an already existing parameter
|
// check if X=y works for an already existing parameter
|
||||||
checkEnv("HOME", "/tmp", "noappend");
|
checkEnv("LANG", "en_us_8859_1", "noappend");
|
||||||
// check if X=/tmp for a new env variable
|
// check if X=/tmp for a new env variable
|
||||||
checkEnv("MY_PATH", "/tmp", "noappend");
|
checkEnv("MY_PATH", "/tmp", "noappend");
|
||||||
// check if X=$X:/tmp works for a new env var and results into :/tmp
|
// check if X=$X:/tmp works for a new env var and results into :/tmp
|
||||||
|
@ -369,7 +369,7 @@ public class TestMiniMRChildTask {
|
||||||
* - x=y (x can be a already existing env variable or a new variable)
|
* - x=y (x can be a already existing env variable or a new variable)
|
||||||
* - x=$x:y (replace $x with the current value of x)
|
* - x=$x:y (replace $x with the current value of x)
|
||||||
*/
|
*/
|
||||||
|
@Test
|
||||||
public void testTaskEnv(){
|
public void testTaskEnv(){
|
||||||
try {
|
try {
|
||||||
JobConf conf = new JobConf(mr.getConfig());
|
JobConf conf = new JobConf(mr.getConfig());
|
||||||
|
@ -392,6 +392,7 @@ public class TestMiniMRChildTask {
|
||||||
* - x=y (x can be a already existing env variable or a new variable)
|
* - x=y (x can be a already existing env variable or a new variable)
|
||||||
* - x=$x:y (replace $x with the current value of x)
|
* - x=$x:y (replace $x with the current value of x)
|
||||||
*/
|
*/
|
||||||
|
@Test
|
||||||
public void testTaskOldEnv(){
|
public void testTaskOldEnv(){
|
||||||
try {
|
try {
|
||||||
JobConf conf = new JobConf(mr.getConfig());
|
JobConf conf = new JobConf(mr.getConfig());
|
||||||
|
@ -415,7 +416,7 @@ public class TestMiniMRChildTask {
|
||||||
EnvCheckMapper.class, EnvCheckReducer.class);
|
EnvCheckMapper.class, EnvCheckReducer.class);
|
||||||
// test
|
// test
|
||||||
// - new SET of new var (MY_PATH)
|
// - new SET of new var (MY_PATH)
|
||||||
// - set of old var (HOME)
|
// - set of old var (LANG)
|
||||||
// - append to an old var from modified env (LD_LIBRARY_PATH)
|
// - append to an old var from modified env (LD_LIBRARY_PATH)
|
||||||
// - append to an old var from tt's env (PATH)
|
// - append to an old var from tt's env (PATH)
|
||||||
// - append to a new var (NEW_PATH)
|
// - append to a new var (NEW_PATH)
|
||||||
|
@ -432,10 +433,10 @@ public class TestMiniMRChildTask {
|
||||||
mapTaskJavaOpts = reduceTaskJavaOpts = TASK_OPTS_VAL;
|
mapTaskJavaOpts = reduceTaskJavaOpts = TASK_OPTS_VAL;
|
||||||
}
|
}
|
||||||
conf.set(mapTaskEnvKey,
|
conf.set(mapTaskEnvKey,
|
||||||
"MY_PATH=/tmp,HOME=/tmp,LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/tmp," +
|
"MY_PATH=/tmp,LANG=en_us_8859_1,LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/tmp," +
|
||||||
"PATH=$PATH:/tmp,NEW_PATH=$NEW_PATH:/tmp");
|
"PATH=$PATH:/tmp,NEW_PATH=$NEW_PATH:/tmp");
|
||||||
conf.set(reduceTaskEnvKey,
|
conf.set(reduceTaskEnvKey,
|
||||||
"MY_PATH=/tmp,HOME=/tmp,LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/tmp," +
|
"MY_PATH=/tmp,LANG=en_us_8859_1,LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/tmp," +
|
||||||
"PATH=$PATH:/tmp,NEW_PATH=$NEW_PATH:/tmp");
|
"PATH=$PATH:/tmp,NEW_PATH=$NEW_PATH:/tmp");
|
||||||
conf.set("path", System.getenv("PATH"));
|
conf.set("path", System.getenv("PATH"));
|
||||||
conf.set(mapTaskJavaOptsKey, mapTaskJavaOpts);
|
conf.set(mapTaskJavaOptsKey, mapTaskJavaOpts);
|
||||||
|
|
Loading…
Reference in New Issue