Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-48651][DOC] Configuring different JDK for Spark on YARN
### What changes were proposed in this pull request? This PR updates the Spark on YARN docs to guide users to configure a different JDK for Spark Applications. ### Why are the changes needed? As of today, the latest Apache Hadoop 3.4.0 does not support Java 17 yet, while Spark 4.0.0 requires at least Java 17, so users who want to use Spark on YARN must configure a different JDK for Spark applications run on YARN. This is also asked in the mailing list https://lists.apache.org/thread/ply807h0hht1h8o7x7g1s3j51mnot5dr ### Does this PR introduce _any_ user-facing change? Yes, it changes the user docs. ### How was this patch tested? I verified the command in a YARN cluster. The following command submits a Spark application with the distributed JDK 21 ``` JAVA_HOME=/opt/openjdk-21 spark-submit \ --master=yarn \ --deploy-mode=cluster \ --archives ./openjdk-21.tar.gz \ --conf spark.yarn.appMasterEnv.JAVA_HOME=./openjdk-21.tar.gz/openjdk-21 \ --conf spark.executorEnv.JAVA_HOME=./openjdk-21.tar.gz/openjdk-21 \ --class org.apache.spark.examples.SparkPi \ spark-examples*.jar 1 ``` <img width="1678" alt="image" src="https://github.com/apache/spark/assets/26535726/363423a9-bbdf-460d-b6e4-72ab5d6a2e53"> <img width="1313" alt="image" src="https://github.com/apache/spark/assets/26535726/dd8dc1b1-bbe4-41cd-9e19-c8ed68b09f82"> <img width="1399" alt="image" src="https://github.com/apache/spark/assets/26535726/5bbebde6-dfbd-437f-8a44-7c23170911ac"> ### Was this patch authored or co-authored using generative AI tooling? No. Closes #47010 from pan3793/SPARK-48651. Lead-authored-by: Cheng Pan <[email protected]> Co-authored-by: Kent Yao <[email protected]> Signed-off-by: Wenchen Fan <[email protected]>
- Loading branch information