Skip to content
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

Fix multi-release jar problem #11185

Merged
merged 4 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions aggregator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
and they are auto-deduped using binary diff
-->
<rapids.shade.package>com.nvidia.shaded.spark</rapids.shade.package>
<rapids.shade.package.path>com/nvidia/shaded/spark</rapids.shade.package.path>
<rapids.compressed.artifact>false</rapids.compressed.artifact>
<rapids.shim.jar.test.phase>none</rapids.shim.jar.test.phase>
<rapids.default.jar.excludePattern>**/*</rapids.default.jar.excludePattern>
Expand Down Expand Up @@ -86,10 +87,21 @@
</excludes>
</artifactSet>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<Multi-Release>true</Multi-Release>
</manifestEntries>
</transformer>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
</transformers>
<relocations>
<!-- relocate multi-release packages -->
<relocation>
<pattern>META-INF/versions/(\d+)/org/roaringbitmap</pattern>
<shadedPattern>META-INF/versions/$1/${rapids.shade.package.path}/org/roaringbitmap</shadedPattern>
<rawString>true</rawString>
</relocation>
<relocation>
<pattern>com.google.flatbuffers</pattern>
<shadedPattern>${rapids.shade.package}.com.google.flatbuffers</shadedPattern>
Expand Down
3 changes: 2 additions & 1 deletion jenkins/Jenkinsfile-blossom.premerge
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@ git --no-pager diff --name-only HEAD \$BASE -- ${PREMERGE_DOCKERFILE} || true"""
execPattern : '**/target/jacoco.exec',
classPattern : 'target/jacoco_classes/',
sourceInclusionPattern: '**/*.java,**/*.scala',
sourcePattern : sourcePattern
sourcePattern : sourcePattern,
exclusionPattern : '*/META-INF/versions/*',
])
} finally {
common.publishPytestResult(this, "${STAGE_NAME}")
Expand Down
3 changes: 1 addition & 2 deletions jenkins/spark-premerge-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,7 @@ mvn_verify() {
# extract the .class files in udf jar and replace the existing ones in spark3xx-ommon and spark$SPK_VER
# because the class files in udf jar will be modified in aggregator's shade phase
jar xf "$UDF_JAR" com/nvidia/spark/udf
# TODO Should clean up unused and duplicated 'org/roaringbitmap' in the spark3xx shim folders, https://github.com/NVIDIA/spark-rapids/issues/11175
rm -rf com/nvidia/shaded/ org/openucx/ spark${SPK_VER}/META-INF/versions/*/org/roaringbitmap/ spark-shared/com/nvidia/spark/udf/ spark${SPK_VER}/com/nvidia/spark/udf/
rm -rf com/nvidia/shaded/ org/openucx/ spark-shared/com/nvidia/spark/udf/ spark${SPK_VER}/com/nvidia/spark/udf/
popd

# Triggering here until we change the jenkins file
Expand Down
12 changes: 12 additions & 0 deletions scala2.13/aggregator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
and they are auto-deduped using binary diff
-->
<rapids.shade.package>com.nvidia.shaded.spark</rapids.shade.package>
<rapids.shade.package.path>com/nvidia/shaded/spark</rapids.shade.package.path>
<rapids.compressed.artifact>false</rapids.compressed.artifact>
<rapids.shim.jar.test.phase>none</rapids.shim.jar.test.phase>
<rapids.default.jar.excludePattern>**/*</rapids.default.jar.excludePattern>
Expand Down Expand Up @@ -86,10 +87,21 @@
</excludes>
</artifactSet>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<Multi-Release>true</Multi-Release>
</manifestEntries>
</transformer>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
</transformers>
<relocations>
<!-- relocate multi-release packages -->
<relocation>
<pattern>META-INF/versions/(\d+)/org/roaringbitmap</pattern>
<shadedPattern>META-INF/versions/$1/${rapids.shade.package.path}/org/roaringbitmap</shadedPattern>
<rawString>true</rawString>
</relocation>
<relocation>
<pattern>com.google.flatbuffers</pattern>
<shadedPattern>${rapids.shade.package}.com.google.flatbuffers</shadedPattern>
Expand Down