ADH-7037: spark4 engine integration - #28
Open
werzerbb wants to merge 17 commits into
Open
Conversation
…tensions/spark/kyuubi-extension-spark-4-2 from upstream (apache/pull/7570)
…ersion to 4.2, check major spark version in SparkProcessBuilder::engineHomeDirFilter()
…me: 4.2 for spark-connector-cross-version-test in .github/workflows/master.yml
…) add spark version suffix to kyuubi-spark-sql-engine artifactId; 3) add 'engine-only' flag in build/dist
…er); 2) add tests to check spark engine profile in spark connect; 3) add spark suffix in artifactId for kyuubi-spark-connect-client module
… in kyuubi-server/pom.xml
…ynMethods + invokeChecked; 2) run mvn spotless:apply
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Spark 4.2 as a second, coexisting engine alongside Spark 3.5:
kyuubi-serverstays Spark-version-neutral.Spark engine received a
-Pspark-4.2build profile. A client can select which engine version/profile to launch per session over Spark Connect, andbuild/distcan package engine jars for multiple Spark versions into a single distribution (--extra-spark-profilesparameter).What was added
upstream (Support Spark 4.2 apache/kyuubi#7570);
kyuubi-spark-sql-engineis now built askyuubi-spark-sql-engine-spark-${spark.artifact.version}_${scala.binary.version}, so 3.5 and 4.2engine jars can coexist in the same distribution without overwriting each other. Same suffix
pattern applied to
kyuubi-spark-connect-client/kyuubi-spark-connect-client-standalone.spark4) via the connection string (kyuubi.engine.profile=spark4), letting one Kyuubi server route different sessions to different Spark major versions' engines.build/dist --extra-spark-profiles: comma-separated list of additional Spark profiles (e.g.spark-4.2) to also build the engine jar for, after the primary-Pspark-X.Ybuild.kyuubi/spark_connect.py):KyuubiSessionBuilderupdated to work against both Spark 3.5's and Spark 4.x's differingChannelBuilder/DefaultChannelBuilderAPIs.KyuubiSessionBuilder.getOrCreate()(extensions/spark/kyuubi-spark-connect-client) now resolves the concreteSparkSessionclass and callsbuilder()/client()/getOrCreate()viaDynClasses/ReflectUtils.invokeAsinstead of a direct compiled call.Build
export JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64 build/dist --tgz --spark-provided --flink-provided --hive-provided --web-ui \ --extra-spark-profiles spark-4.2 \ -Pjdbc-shaded -Pscala-2.13 -Pspark-3.5 -Pzookeeper-3.9 -Drat.skip=trueThis produces one tarball with engine jars for both
-Pspark-3.5(primary) and-Pspark-4.2(extra), under
externals/engines/spark/.Examples (running pyspark via Spark Connect)