-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-53955][CORE][3.5] Prefer to detect Java Home from env JAVA_HOME on finding jmap for JDK 8 #52665
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: branch-3.5
Are you sure you want to change the base?
Conversation
cc @dongjoon-hyun as you are the author of this feature cc @mridulm, I think the Note, this causes a real issue only on Spark 3.5 with JDK 8, but from my understanding, we should always prefer using |
I agree with this change as we can see similar code in |
@sarutak I think we should take them one by one. AppStatusListenerSuite.scala you mentioned is actually affecting display in Spark UI, changing this may surprise users, I lean towards not touching it, but can do if someone thinks we should. In
it's correct for JDK 8 and prior. I think we should change it to
for Spark 4.0 and master, since it's not true for JDK 17+ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, @pan3793 .
Somehow, it returns the same value in JDK 11+ (according to the following article, users are still able to create a JRE by themselves?), but it returns a different value in JDK 8 or prior
For the above question, yes. Oracle no longer offers JRE and Server JRE downloads; consequently since Java 11.
Since Java 17, openjdk Docker Image also doesn't provide *jre*
tag. You can simply search it.
Given that Apache Spark 4.0 supports Java 17+ only, I don't think this PR is valid for both master
and branch-4.0
. If you need this for your Java 8 environment, I'd like to recommend you to convert this to a bug issue for branch-3.5
specifically, @pan3793 . We can discuss more in that context (if exists).
@dongjoon-hyun I retargeted this PR to branch-3.5 |
Thank you for rebasing, @pan3793 . So, the remaining topic is the following previous comment about
|
@dongjoon-hyun this is not about incompatibility between different versions of JDK, the real issue is, in JDK8, |
I must be clear on it. I already got your point about that but what I asked in the above is different. What I asked is more about the previous question when the different JDK versions occurs between |
@dongjoon-hyun I see your point, it's a dedicated issue for JDK 8, I modified the PR title by adding "for JDK 8" suffix, do you think it's clear now? |
What changes were proposed in this pull request?
Prefer to detect Java Home from env
JAVA_HOME
on findingjmap
, then System Propertiesjava.home
Why are the changes needed?
https://stackoverflow.com/questions/45441516/difference-between-java-home-and-java-home
Somehow, it returns the same value in JDK 11+ (according to the following article, users are still able to create a JRE by themselves?), but it returns a different value in JDK 8 or prior
https://adoptium.net/news/2021/12/eclipse-temurin-jres-are-back
In JDK8,
jmap
exists underJAVA_HOME/bin
, but not underJAVA_HOME/jre/bin
.Does this PR introduce any user-facing change?
No.
How was this patch tested?
Manually verified.
Was this patch authored or co-authored using generative AI tooling?
No.