Skip to content

Conversation

@dongjoon-hyun
Copy link
Member

@dongjoon-hyun dongjoon-hyun commented Mar 28, 2024

What changes were proposed in this pull request?

This PR aims to use Java 21 instead of 21-jre in K8s Dockerfile .

Why are the changes needed?

Since Apache Spark 3.5.0, SPARK-44153 starts to use jmap like the following.

val jmap = System.getProperty("java.home") + "/bin/jmap"

$ docker run -it --rm azul/zulu-openjdk:21-jre jmap
docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "jmap": executable file not found in $PATH: unknown.
$ docker run -it --rm azul/zulu-openjdk:21 jmap | head -n2
Usage:
    jmap -clstats <pid>

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Pass the CIs and manual review.

Was this patch authored or co-authored using generative AI tooling?

No.

@dongjoon-hyun
Copy link
Member Author

Hi, @viirya .

Could you review this bug fix for Apache Spark 3.5.0 and 3.5.1?

@dongjoon-hyun dongjoon-hyun changed the title [SPARK-47635][K8S] Use Java 21 instead of 21-jre in K8s Dockerfile [SPARK-47635][K8S] Use Java 21 instead of 21-jre image in K8s Dockerfile Mar 28, 2024
@dongjoon-hyun
Copy link
Member Author

Thank you, @viirya !

@dongjoon-hyun
Copy link
Member Author

Merged to master for Apache Spark 4.0.0.

@dongjoon-hyun dongjoon-hyun deleted the SPARK-47635 branch March 28, 2024 23:33
HyukjinKwon pushed a commit that referenced this pull request Aug 6, 2024
### What changes were proposed in this pull request?

This PR aims to fix `docker-image-tool.sh` to be up-to-date.

### Why are the changes needed?

Apache Spark 4 dropped Java 11 support. So, we should fix the following.
- #43005
```
-  - Build and push Java11-based image with tag "v3.4.0" to docker.io/myrepo
+  - Build and push Java17-based image with tag "v4.0.0" to docker.io/myrepo
```

Apache Spark 4 requires JDK instead of JRE. So, we should fix the following.
- #45761
```
-    $0 -r docker.io/myrepo -t v3.4.0 -b java_image_tag=11-jre build
+    $0 -r docker.io/myrepo -t v4.0.0 -b java_image_tag=17 build
```

Lastly, `3.4.0` is too old because it's released on April 13, 2023. We had better use v4.0.0.
```
-    $0 -r docker.io/myrepo -t v3.4.0 -p kubernetes/dockerfiles/spark/bindings/python/Dockerfile build
+    $0 -r docker.io/myrepo -t v4.0.0 -p kubernetes/dockerfiles/spark/bindings/python/Dockerfile build
```

### Does this PR introduce _any_ user-facing change?

No functional change because this is a usage message.

### How was this patch tested?

Manual review.

### Was this patch authored or co-authored using generative AI tooling?

No.

Closes #47618 from dongjoon-hyun/SPARK-49117.

Authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Hyukjin Kwon <[email protected]>
dongjoon-hyun added a commit to apache/spark-docker that referenced this pull request Sep 18, 2024
### What changes were proposed in this pull request?

This PR aims to use JDK for Spark 3.5+ Docker image. Apache Spark Dockerfile are updated already.
- apache/spark#45762
- apache/spark#45761

### Why are the changes needed?

Since Apache Spark 3.5.0, SPARK-44153 starts to use `jmap` like the following.

- apache/spark#41709

https://github.com/apache/spark/blob/c832e2ac1d04668c77493577662c639785808657/core/src/main/scala/org/apache/spark/util/Utils.scala#L2030

### Does this PR introduce _any_ user-facing change?

Yes, the user can use `Heap Histogram` feature.

### How was this patch tested?

Pass the CIs.

Closes #66 from dongjoon-hyun/SPARK-49701.

Authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants