Skip to content

Commit ef636c4

Browse files
authored
MAPREDUCE-7468: Change add-opens flag's default value from true to false (#6436)
Co-authored-by: Benjamin Teke <bteke@cloudera.com>
1 parent 6a05376 commit ef636c4

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/job/impl/TestMapReduceChildJVM.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ public void testCommandLine() throws Exception {
5252
MyMRApp app = new MyMRApp(1, 0, true, this.getClass().getName(), true);
5353
Configuration conf = new Configuration();
5454
conf.setBoolean(MRConfig.MAPREDUCE_APP_SUBMISSION_CROSS_PLATFORM, true);
55-
conf.setBoolean(MRJobConfig.MAPREDUCE_JVM_ADD_OPENS_JAVA_OPT, false);
5655
Job job = app.submit(conf);
5756
app.waitForState(job, JobState.SUCCEEDED);
5857
app.verifyCompleted();

hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/MRJobConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ public interface MRJobConfig {
312312
public static final String MAPREDUCE_JVM_ADD_OPENS_JAVA_OPT =
313313
"mapreduce.jvm.add-opens-as-default";
314314

315-
public static final boolean MAPREDUCE_JVM_ADD_OPENS_JAVA_OPT_DEFAULT = true;
315+
public static final boolean MAPREDUCE_JVM_ADD_OPENS_JAVA_OPT_DEFAULT = false;
316316

317317
public static final String IO_SORT_FACTOR = "mapreduce.task.io.sort.factor";
318318

hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/resources/mapred-default.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1822,12 +1822,12 @@
18221822

18231823
<property>
18241824
<name>mapreduce.jvm.add-opens-as-default</name>
1825-
<value>true</value>
1825+
<value>false</value>
18261826
<description>Since on JDK17 it's no longer possible to use the reflection API to
18271827
access non-public fields and methods add-opens flags should be added to MR AM
18281828
and map/reduce containers regardless of the user specified java opts. Setting
18291829
this to true will add the flags to the container launch commands on nodes with
1830-
JDK17 or higher. Defaults to true, but the setting has no effect on nodes using
1830+
JDK17 or higher. Defaults to false, and the setting has no effect on nodes using
18311831
JDK16 and before.
18321832
</description>
18331833
</property>

0 commit comments

Comments
 (0)