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

[GLUTEN-3983][CORE] Shade Guava dependency #3984

Merged
merged 3 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
45 changes: 42 additions & 3 deletions package/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,50 @@
<relocations>
<relocation>
<pattern>com.google.protobuf</pattern>
<shadedPattern>io.glutenproject.shaded.com.google.protobuf</shadedPattern>
<shadedPattern>${gluten.shade.packageName}.com.google.protobuf</shadedPattern>
</relocation>
<!-- shaded com.google.guava -->
<relocation>
<pattern>com.google.common</pattern>
<shadedPattern>${gluten.shade.packageName}.com.google.common</shadedPattern>
<includes>
<include>com.google.common.**</include>
</includes>
<excludes>
<exclude>com.google.common.jimfs.**</exclude>
</excludes>
</relocation>
<relocation>
<pattern>com.google.thirdparty</pattern>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also shade com.google.j2objc and com.google.gson ? I saw the Spark connect Server module shade these things and I think it's reasonable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, i'll do rebase and shade those.

<shadedPattern>${gluten.shade.packageName}.com.google.thirdparty</shadedPattern>
<includes>
<include>com.google.thirdparty.**</include>
</includes>
</relocation>
<relocation>
<pattern>com.google.errorprone.annotations</pattern>
<shadedPattern>${gluten.shade.packageName}.com.google.errorprone.annotations</shadedPattern>
<includes>
<include>com.google.errorprone.annotations.**</include>
</includes>
</relocation>
<relocation>
<pattern>com.google.j2objc</pattern>
<shadedPattern>${gluten.shade.packageName}.com.google.j2objc</shadedPattern>
<includes>
<include>com.google.j2objc.**</include>
</includes>
</relocation>
<relocation>
<pattern>com.google.gson</pattern>
<shadedPattern>${gluten.shade.packageName}.com.google.gson</shadedPattern>
<includes>
<include>com.google.gson.**</include>
</includes>
</relocation>
<relocation>
<pattern>org.apache.arrow</pattern>
<shadedPattern>io.glutenproject.shaded.org.apache.arrow</shadedPattern>
<shadedPattern>${gluten.shade.packageName}.org.apache.arrow</shadedPattern>
<!--arrow's C wrapper refers to the original class path, so we should not relocate here-->
<excludes>
<exclude>org.apache.arrow.c.*</exclude>
Expand All @@ -114,7 +153,7 @@
</relocation>
<relocation>
<pattern>com.google.flatbuffers</pattern>
<shadedPattern>io.glutenproject.shaded.com.google.flatbuffers</shadedPattern>
<shadedPattern>${gluten.shade.packageName}.com.google.flatbuffers</shadedPattern>
</relocation>
</relocations>
</configuration>
Expand Down
3 changes: 3 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@
<fasterxml.version>2.13.5</fasterxml.version>
<junit.version>4.13.1</junit.version>

<!-- Package name to use when relocating shaded classes -->
<gluten.shade.packageName>io.glutenproject.shaded</gluten.shade.packageName>

<substrait.version>0.5.0</substrait.version>
<!-- The original protobuf version -->
<protobuf.version>3.23.4</protobuf.version>
Expand Down
Loading