[
https://issues.apache.org/jira/browse/MAPREDUCE-7449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17752683#comment-17752683
]
ASF GitHub Bot commented on MAPREDUCE-7449:
-------------------------------------------
brumi1024 commented on code in PR #5935:
URL: https://github.com/apache/hadoop/pull/5935#discussion_r1289730079
##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/launcher/ContainerLaunch.java:
##########
@@ -170,6 +170,13 @@ public static String expandEnvironment(String var,
var = var.replace(ApplicationConstants.CLASS_PATH_SEPARATOR,
File.pathSeparator);
+ if (Shell.isJavaVersionAtLeast(17)) {
Review Comment:
Had an offline discussion with @tomicooler, the issue with not using a
placeholder is the way commands is contructed: in contrast to it's name and
type it's a String list containing one element only, the command that is to be
executed. In case of Java apps we must add this parameter before the main
class, hence I see two options here: add the placeholder right after -Xmx (so
that we know it'll be in the correct place) or I can deconstruct the first
element of the commands array and add the add-opens flag to the correct place.
I think the former is a cleaner, less error-prone solution.
> Add add-opens flag to container launch commands on JDK17 nodes
> --------------------------------------------------------------
>
> Key: MAPREDUCE-7449
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-7449
> Project: Hadoop Map/Reduce
> Issue Type: New Feature
> Components: mr-am, mrv2
> Affects Versions: 3.4.0
> Reporter: Benjamin Teke
> Assignee: Benjamin Teke
> Priority: Major
> Labels: pull-request-available
>
> To allow containers to launch on JDK17 nodes the add-opens flag should be
> added to the container launch commands if the node has JDK17+, and it
> shouldn't on previous JDKs. This behaviour should be configurable.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]