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 2021/09/27 07:10:44 UTC

[GitHub] [spark] copperybean opened a new pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HMOE for macOS

copperybean opened a new pull request #34111:
URL: https://github.com/apache/spark/pull/34111


   ### What changes were proposed in this pull request?
   Currently, JAVA_HOME may be set to path "/usr" improperly, now JAVA_HOME is fetched from command "/usr/libexec/java_home" for macOS with version greater or equal than 10.5.
   
   
   ### Why are the changes needed?
   Command "./build/mvn xxx" will be stuck on MacOS 11.4, because JAVA_HOME is set to path "/usr" improperly.
   
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   
   ### How was this patch tested?
   Just the existing tests.
   


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] SparkQA commented on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-928826037


   **[Test build #143665 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143665/testReport)** for PR 34111 at commit [`ed66cc5`](https://github.com/apache/spark/commit/ed66cc5b40150e956da265576d6cb179e9a0afe5).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] SparkQA commented on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-929056051


   **[Test build #143674 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143674/testReport)** for PR 34111 at commit [`f1599d5`](https://github.com/apache/spark/commit/f1599d5af74f2e1d0479865bd99f0040ab4982bc).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-927657083


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/48153/
   


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] SparkQA removed a comment on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-928650890


   **[Test build #143665 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143665/testReport)** for PR 34111 at commit [`ed66cc5`](https://github.com/apache/spark/commit/ed66cc5b40150e956da265576d6cb179e9a0afe5).


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] SparkQA commented on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-928650890






-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] AmplabJenkins commented on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-927724348


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143641/
   


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] sarutak commented on a change in pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HMOE for macOS

Posted by GitBox <gi...@apache.org>.
sarutak commented on a change in pull request #34111:
URL: https://github.com/apache/spark/pull/34111#discussion_r716417497



##########
File path: build/mvn
##########
@@ -21,7 +21,12 @@ SELF=$(cd $(dirname $0) && pwd)
 . "$SELF/util.sh"
 
 if [ -z "${JAVA_HOME}" -a "$(command -v javac)" ]; then
-  export JAVA_HOME="$(dirname $(dirname $(realpath $(command -v javac))))"
+  if [ x"$(uname -a | awk '{print $1}')" = xDarwin -a \
+      $(version $(sw_vers -productVersion)) -ge $(version 10.5) ]; then

Review comment:
       Why not just check the existence of `/usr/libexec/java_home` rather than the version of macOS?




-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-927879844


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143645/
   


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HMOE for macOS

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-927543063


   Can one of the admins verify this patch?


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] SparkQA removed a comment on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-927932028


   **[Test build #143647 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143647/testReport)** for PR 34111 at commit [`b1e6327`](https://github.com/apache/spark/commit/b1e6327ae2ca8d967a039fc4430c28ee08823bad).


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] gengliangwang commented on a change in pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
gengliangwang commented on a change in pull request #34111:
URL: https://github.com/apache/spark/pull/34111#discussion_r717234192



##########
File path: build/mvn
##########
@@ -21,7 +21,14 @@ SELF=$(cd $(dirname $0) && pwd)
 . "$SELF/util.sh"
 
 if [ -z "${JAVA_HOME}" -a "$(command -v javac)" ]; then
-  export JAVA_HOME="$(dirname $(dirname $(realpath $(command -v javac))))"
+  if [ "$(uname -s)" = "Darwin" ]; then
+    # For some version of macOS, "/usr/bin/javac" is a real file instead of a symbolic link,

Review comment:
       ```suggestion
       # For some versions of macOS, "/usr/bin/javac" is a real file instead of a symbolic link,
   ```

##########
File path: build/mvn
##########
@@ -21,7 +21,14 @@ SELF=$(cd $(dirname $0) && pwd)
 . "$SELF/util.sh"
 
 if [ -z "${JAVA_HOME}" -a "$(command -v javac)" ]; then
-  export JAVA_HOME="$(dirname $(dirname $(realpath $(command -v javac))))"
+  if [ "$(uname -s)" = "Darwin" ]; then
+    # For some version of macOS, "/usr/bin/javac" is a real file instead of a symbolic link,
+    # so the java home may be set to path "/usr" improperly.
+    # And following command is the appropriate way of getting java home on macOS.

Review comment:
       ```suggestion
       # The following command is an appropriate way of setting JAVA_HOME on macOS.
   ```

##########
File path: build/mvn
##########
@@ -21,7 +21,14 @@ SELF=$(cd $(dirname $0) && pwd)
 . "$SELF/util.sh"
 
 if [ -z "${JAVA_HOME}" -a "$(command -v javac)" ]; then
-  export JAVA_HOME="$(dirname $(dirname $(realpath $(command -v javac))))"
+  if [ "$(uname -s)" = "Darwin" ]; then
+    # For some version of macOS, "/usr/bin/javac" is a real file instead of a symbolic link,
+    # so the java home may be set to path "/usr" improperly.

Review comment:
       ```suggestion
       # so the JAVA_HOME may be set to path "/usr" improperly.
   ```




-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] copperybean commented on a change in pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
copperybean commented on a change in pull request #34111:
URL: https://github.com/apache/spark/pull/34111#discussion_r716749663



##########
File path: build/mvn
##########
@@ -21,7 +21,12 @@ SELF=$(cd $(dirname $0) && pwd)
 . "$SELF/util.sh"
 
 if [ -z "${JAVA_HOME}" -a "$(command -v javac)" ]; then
-  export JAVA_HOME="$(dirname $(dirname $(realpath $(command -v javac))))"
+  if [ x"$(uname -a | awk '{print $1}')" = xDarwin -a \
+      $(version $(sw_vers -productVersion)) -ge $(version 10.5) ]; then

Review comment:
       Yes, you are right.




-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-927862863


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/48158/
   


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] SparkQA removed a comment on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-927600578


   **[Test build #143641 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143641/testReport)** for PR 34111 at commit [`dc389e3`](https://github.com/apache/spark/commit/dc389e3287d2f02fed5175eaf81355377ed9b2f5).


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] sarutak commented on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HMOE for macOS

Posted by GitBox <gi...@apache.org>.
sarutak commented on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-927593793


   ok to test.


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] copperybean commented on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
copperybean commented on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-928637030


   @sarutak OK, no problem. Indeed, I tested on my Big Sur first, then submitted the codes. And I have not realized to mention it in the commit message, it's my fault.


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] SparkQA commented on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-927782911


   **[Test build #143645 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143645/testReport)** for PR 34111 at commit [`51f2759`](https://github.com/apache/spark/commit/51f27597ee29fe0a6bf91866dc778ba44e04030f).


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-929023878


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/48186/
   


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] AmplabJenkins commented on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-929008975


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/48187/
   


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] gengliangwang closed pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
gengliangwang closed pull request #34111:
URL: https://github.com/apache/spark/pull/34111


   


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] AmplabJenkins commented on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-929023878


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/48186/
   


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-928764976


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/48177/
   


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] SparkQA commented on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-928745943


   Kubernetes integration test status failure
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/48177/
   


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] sarutak commented on a change in pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
sarutak commented on a change in pull request #34111:
URL: https://github.com/apache/spark/pull/34111#discussion_r716756439



##########
File path: build/mvn
##########
@@ -21,7 +21,12 @@ SELF=$(cd $(dirname $0) && pwd)
 . "$SELF/util.sh"
 
 if [ -z "${JAVA_HOME}" -a "$(command -v javac)" ]; then
-  export JAVA_HOME="$(dirname $(dirname $(realpath $(command -v javac))))"
+  if [ x"$(uname -a | awk '{print $1}')" = xDarwin -a \
+      $(version $(sw_vers -productVersion)) -ge $(version 10.5) ]; then

Review comment:
       > it's irrelevant with the problem that what version of macOS is Java8 supported.
   
   Building Spark with Maven requires Java 8 (https://spark.apache.org/docs/latest/building-spark.html#apache-maven).
   Java 8 supports OS X 10.8.3+ and 10.9+.
   So, someone who want to build with `build/mvn` should use 10.8.3+ or 10.9+.




-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] copperybean commented on a change in pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HMOE for macOS

Posted by GitBox <gi...@apache.org>.
copperybean commented on a change in pull request #34111:
URL: https://github.com/apache/spark/pull/34111#discussion_r716427383



##########
File path: build/mvn
##########
@@ -21,7 +21,12 @@ SELF=$(cd $(dirname $0) && pwd)
 . "$SELF/util.sh"
 
 if [ -z "${JAVA_HOME}" -a "$(command -v javac)" ]; then
-  export JAVA_HOME="$(dirname $(dirname $(realpath $(command -v javac))))"
+  if [ x"$(uname -a | awk '{print $1}')" = xDarwin -a \
+      $(version $(sw_vers -productVersion)) -ge $(version 10.5) ]; then

Review comment:
       I think just checking the existence of `/usr/libexec/java_home` is not a good idea, this path is not a standard for every OS, some one may put another command with same path but providing different behavior. So it's better to use a command provided by some specific OS obviously.




-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] AmplabJenkins commented on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-927741078


   Can one of the admins verify this patch?


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] AmplabJenkins commented on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-928042054


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/48160/
   


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] SparkQA commented on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-928695503


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/48177/
   


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] AmplabJenkins commented on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-927879844


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143645/
   


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] SparkQA commented on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-928042004


   Kubernetes integration test status failure
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/48160/
   


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] AmplabJenkins commented on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-928084672


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143647/
   


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-928042054


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/48160/
   


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] gengliangwang commented on a change in pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
gengliangwang commented on a change in pull request #34111:
URL: https://github.com/apache/spark/pull/34111#discussion_r717234192



##########
File path: build/mvn
##########
@@ -21,7 +21,14 @@ SELF=$(cd $(dirname $0) && pwd)
 . "$SELF/util.sh"
 
 if [ -z "${JAVA_HOME}" -a "$(command -v javac)" ]; then
-  export JAVA_HOME="$(dirname $(dirname $(realpath $(command -v javac))))"
+  if [ "$(uname -s)" = "Darwin" ]; then
+    # For some version of macOS, "/usr/bin/javac" is a real file instead of a symbolic link,

Review comment:
       ```suggestion
       # For some versions of macOS, "/usr/bin/javac" is a real file instead of a symbolic link,
   ```




-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] SparkQA commented on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-929004943


   Kubernetes integration test status failure
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/48187/
   


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] SparkQA commented on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-928976179


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/48186/
   


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] SparkQA removed a comment on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-928938208


   **[Test build #143674 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143674/testReport)** for PR 34111 at commit [`f1599d5`](https://github.com/apache/spark/commit/f1599d5af74f2e1d0479865bd99f0040ab4982bc).


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] sarutak commented on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
sarutak commented on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-927966347


   @copperybean 
   > This time, I'm checking with build/mvn -DskipTests package on my Big Sur.
   
   It passed. So please let me modify `How was this patch tested?` in the description.


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-928084672


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143647/
   


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] AmplabJenkins commented on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-929057595


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143674/
   


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] gengliangwang commented on a change in pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
gengliangwang commented on a change in pull request #34111:
URL: https://github.com/apache/spark/pull/34111#discussion_r716878945



##########
File path: build/mvn
##########
@@ -21,7 +21,11 @@ SELF=$(cd $(dirname $0) && pwd)
 . "$SELF/util.sh"
 
 if [ -z "${JAVA_HOME}" -a "$(command -v javac)" ]; then
-  export JAVA_HOME="$(dirname $(dirname $(realpath $(command -v javac))))"
+  if [ "$(uname -s)" = "Darwin" ]; then

Review comment:
       Nit: add one line comment here 




-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-927724348


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143641/
   


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] AmplabJenkins commented on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-928764976






-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] SparkQA commented on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-927878356


   **[Test build #143645 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143645/testReport)** for PR 34111 at commit [`51f2759`](https://github.com/apache/spark/commit/51f27597ee29fe0a6bf91866dc778ba44e04030f).
    * This patch **fails PySpark unit tests**.
    * This patch merges cleanly.
    * This patch adds no public classes.


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] sarutak commented on a change in pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
sarutak commented on a change in pull request #34111:
URL: https://github.com/apache/spark/pull/34111#discussion_r716545749



##########
File path: build/mvn
##########
@@ -21,7 +21,12 @@ SELF=$(cd $(dirname $0) && pwd)
 . "$SELF/util.sh"
 
 if [ -z "${JAVA_HOME}" -a "$(command -v javac)" ]; then
-  export JAVA_HOME="$(dirname $(dirname $(realpath $(command -v javac))))"
+  if [ x"$(uname -a | awk '{print $1}')" = xDarwin -a \
+      $(version $(sw_vers -productVersion)) -ge $(version 10.5) ]; then

Review comment:
       Hmm, as you say, `/usr/libexec/java_home` is not standard path and user might put a file on the same path.
   But, even though macOS 10.5+ is used, user still might overwrite the path with their own file.
   
   Even if we check that the OS is macOS, it's too much to check the version. AFAIK Hadoop and Netty uses `/usr/libexec/java_home` for macOS but they just check whether `Darwin` or not.
   Also, you can use `name -s` to get the OS name.




-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] sarutak commented on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
sarutak commented on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-927948334


   > Just the existing tests.
   
   It's not enough for this change because our CIs don't run on macOS. So, please make sure your change works on your environment and note how you have checked in the description next time.
   This time, I'm checking with `build/mvn -DskipTests package`.


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] AmplabJenkins commented on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-928764976


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/48177/
   


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] SparkQA commented on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-928938208


   **[Test build #143674 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143674/testReport)** for PR 34111 at commit [`f1599d5`](https://github.com/apache/spark/commit/f1599d5af74f2e1d0479865bd99f0040ab4982bc).


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-928832543


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143665/
   


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] copperybean commented on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
copperybean commented on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-928637030


   @sarutak OK, no problem. Indeed, I tested on my Big Sur first, then submitted the codes. And I have not realized to mention it in the commit message, it's my fault.


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] AmplabJenkins commented on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-928832543


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143665/
   


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] gengliangwang commented on a change in pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
gengliangwang commented on a change in pull request #34111:
URL: https://github.com/apache/spark/pull/34111#discussion_r717234537



##########
File path: build/mvn
##########
@@ -21,7 +21,14 @@ SELF=$(cd $(dirname $0) && pwd)
 . "$SELF/util.sh"
 
 if [ -z "${JAVA_HOME}" -a "$(command -v javac)" ]; then
-  export JAVA_HOME="$(dirname $(dirname $(realpath $(command -v javac))))"
+  if [ "$(uname -s)" = "Darwin" ]; then
+    # For some version of macOS, "/usr/bin/javac" is a real file instead of a symbolic link,
+    # so the java home may be set to path "/usr" improperly.
+    # And following command is the appropriate way of getting java home on macOS.

Review comment:
       ```suggestion
       # The following command is an appropriate way of setting JAVA_HOME on macOS.
   ```




-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] SparkQA commented on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-927624755


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/48153/
   


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] SparkQA commented on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HMOE for macOS

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-927600578


   **[Test build #143641 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143641/testReport)** for PR 34111 at commit [`dc389e3`](https://github.com/apache/spark/commit/dc389e3287d2f02fed5175eaf81355377ed9b2f5).


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] copperybean commented on a change in pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
copperybean commented on a change in pull request #34111:
URL: https://github.com/apache/spark/pull/34111#discussion_r716601773



##########
File path: build/mvn
##########
@@ -21,7 +21,12 @@ SELF=$(cd $(dirname $0) && pwd)
 . "$SELF/util.sh"
 
 if [ -z "${JAVA_HOME}" -a "$(command -v javac)" ]; then
-  export JAVA_HOME="$(dirname $(dirname $(realpath $(command -v javac))))"
+  if [ x"$(uname -a | awk '{print $1}')" = xDarwin -a \
+      $(version $(sw_vers -productVersion)) -ge $(version 10.5) ]; then

Review comment:
       According to the [link](https://mkyong.com/java/how-to-set-java_home-environment-variable-on-mac-os-x/#what-is-usrlibexecjava-home), `/usr/libexec/java_home` is a standard definition for macOS 10.5+.
   We should assume that user should not destroy their OS environment by replacing a standard command by another file.
   
   As you mentioned, `uname -s` is better than my solution, I have change my codes.




-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] gengliangwang commented on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
gengliangwang commented on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-929017112


   Thanks, merging to master/3.2


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] AmplabJenkins commented on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HMOE for macOS

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-927543063


   Can one of the admins verify this patch?


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] SparkQA commented on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-927853637


   Kubernetes integration test status failure
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/48158/
   


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] gengliangwang commented on a change in pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
gengliangwang commented on a change in pull request #34111:
URL: https://github.com/apache/spark/pull/34111#discussion_r717234928



##########
File path: build/mvn
##########
@@ -21,7 +21,14 @@ SELF=$(cd $(dirname $0) && pwd)
 . "$SELF/util.sh"
 
 if [ -z "${JAVA_HOME}" -a "$(command -v javac)" ]; then
-  export JAVA_HOME="$(dirname $(dirname $(realpath $(command -v javac))))"
+  if [ "$(uname -s)" = "Darwin" ]; then
+    # For some version of macOS, "/usr/bin/javac" is a real file instead of a symbolic link,
+    # so the java home may be set to path "/usr" improperly.

Review comment:
       ```suggestion
       # so the JAVA_HOME may be set to path "/usr" improperly.
   ```




-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] SparkQA commented on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-927808036


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/48158/
   


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] AmplabJenkins commented on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-927862863


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/48158/
   


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] SparkQA commented on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-927932028


   **[Test build #143647 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143647/testReport)** for PR 34111 at commit [`b1e6327`](https://github.com/apache/spark/commit/b1e6327ae2ca8d967a039fc4430c28ee08823bad).


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] copperybean commented on a change in pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
copperybean commented on a change in pull request #34111:
URL: https://github.com/apache/spark/pull/34111#discussion_r716736248



##########
File path: build/mvn
##########
@@ -21,7 +21,12 @@ SELF=$(cd $(dirname $0) && pwd)
 . "$SELF/util.sh"
 
 if [ -z "${JAVA_HOME}" -a "$(command -v javac)" ]; then
-  export JAVA_HOME="$(dirname $(dirname $(realpath $(command -v javac))))"
+  if [ x"$(uname -a | awk '{print $1}')" = xDarwin -a \
+      $(version $(sw_vers -productVersion)) -ge $(version 10.5) ]; then

Review comment:
       Well, it's a different problem with what you said. I mean, `/usr/libexec/java_home` is an OS behavior which provides a command to output the home path of Java, it's irrelevant with the problem that what version of macOS is Java8 supported.
   
   In other words, there are almost no one using mac OS with version less than 10.5 according to the [statistic](https://www.statista.com/statistics/944559/worldwide-macos-version-market-share/), so it's not important already to check whether version is 10.5+ or not. So, I can remove it if you insist.




-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-928084672






-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] SparkQA commented on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-928972894


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/48187/
   


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] SparkQA commented on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-928070297


   **[Test build #143647 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143647/testReport)** for PR 34111 at commit [`b1e6327`](https://github.com/apache/spark/commit/b1e6327ae2ca8d967a039fc4430c28ee08823bad).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] sarutak edited a comment on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
sarutak edited a comment on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-927948334


   > Just the existing tests.
   
   It's not enough for this change because our CIs don't run on macOS. So, please make sure your change works on your environment and note how you have checked in the description next time.
   This time, I'm checking with `build/mvn -DskipTests package` on my Big Sur.


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-927741078


   Can one of the admins verify this patch?


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-929008975


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/48187/
   


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] copperybean commented on a change in pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
copperybean commented on a change in pull request #34111:
URL: https://github.com/apache/spark/pull/34111#discussion_r717170761



##########
File path: build/mvn
##########
@@ -21,7 +21,12 @@ SELF=$(cd $(dirname $0) && pwd)
 . "$SELF/util.sh"
 
 if [ -z "${JAVA_HOME}" -a "$(command -v javac)" ]; then
-  export JAVA_HOME="$(dirname $(dirname $(realpath $(command -v javac))))"
+  if [ x"$(uname -a | awk '{print $1}')" = xDarwin -a \
+      $(version $(sw_vers -productVersion)) -ge $(version 10.5) ]; then

Review comment:
       Yes, I realized this point just after I submitted the comment, and I deleted that comment immediately.

##########
File path: build/mvn
##########
@@ -21,7 +21,11 @@ SELF=$(cd $(dirname $0) && pwd)
 . "$SELF/util.sh"
 
 if [ -z "${JAVA_HOME}" -a "$(command -v javac)" ]; then
-  export JAVA_HOME="$(dirname $(dirname $(realpath $(command -v javac))))"
+  if [ "$(uname -s)" = "Darwin" ]; then

Review comment:
       Done




-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] SparkQA commented on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-927977188


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/48160/
   


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] sarutak commented on a change in pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
sarutak commented on a change in pull request #34111:
URL: https://github.com/apache/spark/pull/34111#discussion_r716647514



##########
File path: build/mvn
##########
@@ -21,7 +21,12 @@ SELF=$(cd $(dirname $0) && pwd)
 . "$SELF/util.sh"
 
 if [ -z "${JAVA_HOME}" -a "$(command -v javac)" ]; then
-  export JAVA_HOME="$(dirname $(dirname $(realpath $(command -v javac))))"
+  if [ x"$(uname -a | awk '{print $1}')" = xDarwin -a \
+      $(version $(sw_vers -productVersion)) -ge $(version 10.5) ]; then

Review comment:
       Java 8 supports OS X 10.8.3+ and 10.9+.
   https://java.com/download/help/sysreq.html
   
   So, I don't think it's necessary to check whether the version is 10.5+ or not as it's trivial.




-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] SparkQA commented on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-927715754


   **[Test build #143641 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143641/testReport)** for PR 34111 at commit [`dc389e3`](https://github.com/apache/spark/commit/dc389e3287d2f02fed5175eaf81355377ed9b2f5).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] SparkQA removed a comment on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-927782911


   **[Test build #143645 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143645/testReport)** for PR 34111 at commit [`51f2759`](https://github.com/apache/spark/commit/51f27597ee29fe0a6bf91866dc778ba44e04030f).


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] gengliangwang commented on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
gengliangwang commented on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-929017112


   Thanks, merging to master/3.2


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] SparkQA commented on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-927657041


   Kubernetes integration test status failure
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/48153/
   


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] sarutak commented on a change in pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
sarutak commented on a change in pull request #34111:
URL: https://github.com/apache/spark/pull/34111#discussion_r716545749



##########
File path: build/mvn
##########
@@ -21,7 +21,12 @@ SELF=$(cd $(dirname $0) && pwd)
 . "$SELF/util.sh"
 
 if [ -z "${JAVA_HOME}" -a "$(command -v javac)" ]; then
-  export JAVA_HOME="$(dirname $(dirname $(realpath $(command -v javac))))"
+  if [ x"$(uname -a | awk '{print $1}')" = xDarwin -a \
+      $(version $(sw_vers -productVersion)) -ge $(version 10.5) ]; then

Review comment:
       Hmm, as you say, `/usr/libexec/java_home` is not standard path and user might put a file on the same path.
   But, even though macOS 10.5+ is used, user still might overwrite the path with their own file.
   
   Even if we check that the OS is macOS, it's too much to check the version. AFAIK Hadoop and Netty use `/usr/libexec/java_home` for macOS but they just check whether `Darwin` or not.
   Also, you can use `name -s` to get the OS name.




-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] copperybean commented on a change in pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
copperybean commented on a change in pull request #34111:
URL: https://github.com/apache/spark/pull/34111#discussion_r716736248



##########
File path: build/mvn
##########
@@ -21,7 +21,12 @@ SELF=$(cd $(dirname $0) && pwd)
 . "$SELF/util.sh"
 
 if [ -z "${JAVA_HOME}" -a "$(command -v javac)" ]; then
-  export JAVA_HOME="$(dirname $(dirname $(realpath $(command -v javac))))"
+  if [ x"$(uname -a | awk '{print $1}')" = xDarwin -a \
+      $(version $(sw_vers -productVersion)) -ge $(version 10.5) ]; then

Review comment:
       Well, it's a different problem with what you said. I mean, `/usr/libexec/java_home` is an OS behavior which provides a command to output the home path of Java, it's irrelevant with the problem that what version of macOS is Java8 supported.
   
   In other words, there are almost no one using mac OS with version less than 10.5 according to the [statistic](https://www.statista.com/statistics/944559/worldwide-macos-version-market-share/), so it's not important already to check whether version is 10.5+ or not. So, I can remove it if you insist.




-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] AmplabJenkins commented on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-927657083


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/48153/
   


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] SparkQA commented on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-928650890


   **[Test build #143665 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143665/testReport)** for PR 34111 at commit [`ed66cc5`](https://github.com/apache/spark/commit/ed66cc5b40150e956da265576d6cb179e9a0afe5).


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] copperybean commented on a change in pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
copperybean commented on a change in pull request #34111:
URL: https://github.com/apache/spark/pull/34111#discussion_r717170761



##########
File path: build/mvn
##########
@@ -21,7 +21,12 @@ SELF=$(cd $(dirname $0) && pwd)
 . "$SELF/util.sh"
 
 if [ -z "${JAVA_HOME}" -a "$(command -v javac)" ]; then
-  export JAVA_HOME="$(dirname $(dirname $(realpath $(command -v javac))))"
+  if [ x"$(uname -a | awk '{print $1}')" = xDarwin -a \
+      $(version $(sw_vers -productVersion)) -ge $(version 10.5) ]; then

Review comment:
       Yes, I realized this point just after I submitted the comment, and I deleted that comment immediately.




-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] copperybean commented on a change in pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
copperybean commented on a change in pull request #34111:
URL: https://github.com/apache/spark/pull/34111#discussion_r717175853



##########
File path: build/mvn
##########
@@ -21,7 +21,11 @@ SELF=$(cd $(dirname $0) && pwd)
 . "$SELF/util.sh"
 
 if [ -z "${JAVA_HOME}" -a "$(command -v javac)" ]; then
-  export JAVA_HOME="$(dirname $(dirname $(realpath $(command -v javac))))"
+  if [ "$(uname -s)" = "Darwin" ]; then

Review comment:
       Done




-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-929057595


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143674/
   


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] gengliangwang closed pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
gengliangwang closed pull request #34111:
URL: https://github.com/apache/spark/pull/34111


   


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] SparkQA removed a comment on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-928650890






-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] SparkQA commented on pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34111:
URL: https://github.com/apache/spark/pull/34111#issuecomment-929023855


   Kubernetes integration test status failure
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/48186/
   


-- 
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: reviews-unsubscribe@spark.apache.org

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



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


[GitHub] [spark] sarutak commented on a change in pull request #34111: [SPARK-36856][BUILD] Get correct JAVA_HOME for macOS

Posted by GitBox <gi...@apache.org>.
sarutak commented on a change in pull request #34111:
URL: https://github.com/apache/spark/pull/34111#discussion_r716756439



##########
File path: build/mvn
##########
@@ -21,7 +21,12 @@ SELF=$(cd $(dirname $0) && pwd)
 . "$SELF/util.sh"
 
 if [ -z "${JAVA_HOME}" -a "$(command -v javac)" ]; then
-  export JAVA_HOME="$(dirname $(dirname $(realpath $(command -v javac))))"
+  if [ x"$(uname -a | awk '{print $1}')" = xDarwin -a \
+      $(version $(sw_vers -productVersion)) -ge $(version 10.5) ]; then

Review comment:
       > it's irrelevant with the problem that what version of macOS is Java8 supported.
   
   Building Spark with Maven requires Java 8 (https://spark.apache.org/docs/latest/building-spark.html#apache-maven).
   Java 8 supports OS X 10.8.3+ and 10.9+.
   So, someone who wants to build with `build/mvn` should use 10.8.3+ or 10.9+.




-- 
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: reviews-unsubscribe@spark.apache.org

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



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