From f6fea5da2a62ec6a9da974c23b545c1371f3cbc2 Mon Sep 17 00:00:00 2001 From: Benjamin Teke Date: Mon, 15 Jan 2024 14:24:56 +0100 Subject: [PATCH] MAPREDUCE-7468. [Addendum] Fix TestMapReduceChildJVM unit tests. (#6451) --- .../mapreduce/v2/app/job/impl/TestMapReduceChildJVM.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/job/impl/TestMapReduceChildJVM.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/job/impl/TestMapReduceChildJVM.java index d653186edd..699afbf3ca 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/job/impl/TestMapReduceChildJVM.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/job/impl/TestMapReduceChildJVM.java @@ -108,6 +108,7 @@ private void testReduceCommandLine(Configuration conf) MyMRApp app = new MyMRApp(0, 1, true, this.getClass().getName(), true); conf.setBoolean(MRConfig.MAPREDUCE_APP_SUBMISSION_CROSS_PLATFORM, true); + conf.setBoolean(MRJobConfig.MAPREDUCE_JVM_ADD_OPENS_JAVA_OPT, true); Job job = app.submit(conf); app.waitForState(job, JobState.SUCCEEDED); app.verifyCompleted(); @@ -149,7 +150,7 @@ private void testReduceCommandLine(Configuration conf) } @Test (timeout = 30000) - public void testCommandLineWithLog4JConifg() throws Exception { + public void testCommandLineWithLog4JConfig() throws Exception { MyMRApp app = new MyMRApp(1, 0, true, this.getClass().getName(), true); Configuration conf = new Configuration(); @@ -165,7 +166,7 @@ public void testCommandLineWithLog4JConifg() throws Exception { "[" + MRApps.crossPlatformify("JAVA_HOME") + "/bin/java" + " -Djava.net.preferIPv4Stack=true" + " -Dhadoop.metrics.log.level=WARN " + - " -Xmx820m -Djava.io.tmpdir=" + MRApps.crossPlatformify("PWD") + "/tmp" + + " -Xmx820m -Djava.io.tmpdir=" + MRApps.crossPlatformify("PWD") + "/tmp" + " -Dlog4j.configuration=" + testLogPropertieFile + " -Dyarn.app.container.log.dir=" + " -Dyarn.app.container.log.filesize=0" +