Skip to content

Commit afc34ad

Browse files
committed
fix(spark): JAVA_HOME needs to point to OpenJDK
1 parent 1e2d331 commit afc34ad

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

spark-k8s/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ RUN <<EOF
306306
microdnf update
307307
# procps: required for spark startup scripts
308308
# java-*-openjdk-devel: This is needed by the Spark UI to display process information using jps and jmap
309+
# The spark-connect server also needs it to compile auto-generated classes on the fly.
309310
# Copying just the binaries from the builder stage failed.
310311
microdnf install \
311312
gzip \
@@ -318,6 +319,10 @@ microdnf install \
318319
microdnf clean all
319320
rm -rf /var/cache/yum
320321

322+
# The base image (java-base) defines this to point to a JRE installation.
323+
# Spark Connect requires it to point to a JDK installation.
324+
ENV JAVA_HOME="/usr/lib/jvm/java-${JAVA_VERSION}-openjdk"
325+
321326
ln -s /usr/bin/python${PYTHON} /usr/bin/python
322327
ln -s /usr/bin/pip-${PYTHON} /usr/bin/pip
323328

0 commit comments

Comments
 (0)