-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Spark: Fix runtime jars packaging scala library files #5754
Conversation
cc: @fqaiser94, @rdblue, @Fokko, @RussellSpitzer |
Have a quick check of spark runtime jar, |
Will handle it in the follow-up PR as it affects all the engine runtime jars and usually I get comments to separate the independent issues. |
9ce1fd3
to
dbd2f2f
Compare
spark/v3.3/build.gradle
Outdated
implementation project(":iceberg-spark:iceberg-spark-${sparkMajorVersion}_${scalaVersion}") | ||
implementation project(":iceberg-spark:iceberg-spark-extensions-${sparkMajorVersion}_${scalaVersion}") | ||
implementation(project(":iceberg-spark:iceberg-spark-${sparkMajorVersion}_${scalaVersion}")) { | ||
exclude group: 'org.scala-lang', module: 'scala-library' |
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.
My previous comment may be unclear, my suggestion is to add the following part after line 190
exclude group: 'org.scala-lang'
exclude group: 'org.scala-lang.modules'
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.
4e6891b
to
5e7f37b
Compare
5e7f37b
to
801d82d
Compare
@KarlManong also verified these changes as mentioned in #5732 |
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.
Looks good! Thanks @ajantha-bhat
After:
➜ iceberg git:(runtime) ls -lah spark/v3.3/spark-runtime/build/libs
total 53904
drwxr-xr-x 6 fokkodriesprong staff 192B Sep 14 15:37 .
drwxr-xr-x 8 fokkodriesprong staff 256B Sep 14 15:37 ..
-rw-r--r-- 1 fokkodriesprong staff 5.9K Sep 14 15:37 iceberg-spark-runtime-3.3_2.12-0.15.0-SNAPSHOT-javadoc.jar
-rw-r--r-- 1 fokkodriesprong staff 5.9K Sep 14 15:37 iceberg-spark-runtime-3.3_2.12-0.15.0-SNAPSHOT-sources.jar
-rw-r--r-- 1 fokkodriesprong staff 5.9K Sep 14 15:37 iceberg-spark-runtime-3.3_2.12-0.15.0-SNAPSHOT-tests.jar
-rw-r--r-- 1 fokkodriesprong staff 25M Sep 14 15:37 iceberg-spark-runtime-3.3_2.12-0.15.0-SNAPSHOT.jar
Before:
➜ iceberg git:(master) ls -lah spark/v3.3/spark-runtime/build/libs
total 64496
drwxr-xr-x 6 fokkodriesprong staff 192B Sep 14 15:39 .
drwxr-xr-x 8 fokkodriesprong staff 256B Sep 14 15:40 ..
-rw-r--r-- 1 fokkodriesprong staff 5.9K Sep 14 15:39 iceberg-spark-runtime-3.3_2.12-0.15.0-SNAPSHOT-javadoc.jar
-rw-r--r-- 1 fokkodriesprong staff 5.9K Sep 14 15:39 iceberg-spark-runtime-3.3_2.12-0.15.0-SNAPSHOT-sources.jar
-rw-r--r-- 1 fokkodriesprong staff 5.9K Sep 14 15:39 iceberg-spark-runtime-3.3_2.12-0.15.0-SNAPSHOT-tests.jar
-rw-r--r-- 1 fokkodriesprong staff 31M Sep 14 15:40 iceberg-spark-runtime-3.3_2.12-0.15.0-SNAPSHOT.jar
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.
LGTM, thanks @ajantha-bhat
* Spark: Fix runtime jars packaging scala library files * apply review comments
* Spark: Fix runtime jars packaging scala library files * apply review comments
* Spark: Fix runtime jars packaging scala library files * apply review comments
* Spark: Fix runtime jars packaging scala library files * apply review comments
#4009 adds a dependency on
scala.collection.compat
which is bringing thescala-library
dependencies and causing the runtime jars to be packaged with scala-library files.So far, two issues reported that scala files packaged with run time jar is conflicting with their environment scala files.
Applicable only to spark-3.3 and spark-3.2 as PR#4009 is present only in these versions. This change also reduces the runtime jar size by 4MB!
Fixes #5732