Yikun commented on a change in pull request #35176:
URL: https://github.com/apache/spark/pull/35176#discussion_r782904424



##########
File path: 
resource-managers/kubernetes/docker/src/main/dockerfiles/spark/entrypoint.sh
##########
@@ -36,6 +36,10 @@ if [ -z "$uidentry" ] ; then
     fi
 fi
 
+if [ -z "$JAVA_HOME" ]; then
+  JAVA_HOME=$(java -XshowSettings:properties -version 2>&1 > /dev/null | grep 
'java.home' | awk '{print $3}')

Review comment:
       ```
   root@yikun-x86:~# java -XshowSettings:properties -version 2>&1 > /dev/null | 
grep 'java.home' | awk '{print $3}'
   /usr/lib/jvm/java-8-openjdk-amd64/jre
   
   root@yikun-arm:~# java -XshowSettings:properties -version 2>&1 > /dev/null | 
grep 'java.home' | awk '{print $3}'
   /usr/lib/jvm/java-8-openjdk-arm64/jre
   ```
   
   looks like it link to `$JAVA_HOME/jre` in my local env.
    
   Maybe we could just use `/usr/lib/jvm/java-17-openjdk-$(dpkg 
--print-architecture)/` or asign `dpkg --print-architecture` to ARCH in 
dockerfile.




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to