You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2018/12/16 23:43:56 UTC

[GitHub] srowen commented on a change in pull request #21663: [SPARK-24680][Deploy]Support spark.executorEnv.JAVA_HOME in Standalone mode

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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org