Skip to content

Commit

Permalink
[#3059] fix(spark-connector): Failed to run spark sql with spark-conn…
Browse files Browse the repository at this point in the history
…ector-runtime.jar (#3073)

### What changes were proposed in this pull request?
shade apache hc only

### Why are the changes needed?
if shading `org.apache`, spark package will be shaded to
`com/datastrato/gravitino/shaded/org/apache/spark`, but spark package is
not build in spark-connector, leading ClassNotFound exception

Fix: #3059 

### Does this PR introduce _any_ user-facing change?
no

### How was this patch tested?
build spark connector jar and run with spark
  • Loading branch information
FANNG1 authored Apr 21, 2024
1 parent 6bf11d1 commit 9299e74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spark-connector/spark-connector-runtime/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ tasks.withType<ShadowJar>(ShadowJar::class.java) {
// Relocate dependencies to avoid conflicts
relocate("com.google", "com.datastrato.gravitino.shaded.com.google")
relocate("google", "com.datastrato.gravitino.shaded.google")
relocate("org.apache", "com.datastrato.gravitino.shaded.org.apache")
relocate("org.apache.hc", "com.datastrato.gravitino.shaded.org.apache.hc")
}

tasks.jar {
Expand Down

0 comments on commit 9299e74

Please sign in to comment.