maheshrajus commented on code in PR #407:
URL: https://github.com/apache/tez/pull/407#discussion_r2079056463


##########
tez-api/src/main/java/org/apache/tez/dag/api/TezConfiguration.java:
##########
@@ -396,8 +396,18 @@ public TezConfiguration(boolean loadDefaults) {
   @ConfigurationProperty
   public static final String TEZ_AM_LAUNCH_CLUSTER_DEFAULT_CMD_OPTS =
       TEZ_AM_PREFIX + "launch.cluster-default.cmd-opts";
-  public static final String TEZ_AM_LAUNCH_CLUSTER_DEFAULT_CMD_OPTS_DEFAULT =
-      "-server -Djava.net.preferIPv4Stack=true 
-Dhadoop.metrics.log.level=WARN";
+  public static final String TEZ_AM_LAUNCH_CLUSTER_DEFAULT_CMD_OPTS_DEFAULT;
+
+  static {
+    if (TezCommonUtils.getJavaVersion() >= 9) {
+      TEZ_AM_LAUNCH_CLUSTER_DEFAULT_CMD_OPTS_DEFAULT =
+        "-server -Djava.net.preferIPv4Stack=true 
-Dhadoop.metrics.log.level=WARN " +
+        "--add-opens java.base/java.lang=ALL-UNNAMED";
+    } else {
+      TEZ_AM_LAUNCH_CLUSTER_DEFAULT_CMD_OPTS_DEFAULT =
+        "-server -Djava.net.preferIPv4Stack=true 
-Dhadoop.metrics.log.level=WARN";
+    }
+  }

Review Comment:
   Fixed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@tez.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to