srowen commented on a change in pull request #21663:
[SPARK-24680][Deploy]Support spark.executorEnv.JAVA_HOME in Standalone mode
URL: https://github.com/apache/spark/pull/21663#discussion_r242002366
##########
File path:
launcher/src/main/java/org/apache/spark/launcher/AbstractCommandBuilder.java
##########
@@ -95,10 +95,12 @@
if (javaHome != null) {
cmd.add(join(File.separator, javaHome, "bin", "java"));
+ } else if (childEnv.containsKey("JAVA_HOME")) {
Review comment:
I think this change could be fine, but I wonder if we can rewrite the logic
so that these cases update a variable tracking what the Java home is, and add
the command once at the end. The logic is duplicated four times here.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]