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

[#3320] fix(client): shadow slf4j for client-java-runtime #3318

Merged
merged 3 commits into from
May 10, 2024

Conversation

FANNG1
Copy link
Contributor

@FANNG1 FANNG1 commented May 10, 2024

What changes were proposed in this pull request?

shadow slf4j for client-java-runtime and spark-connector-runtime

Why are the changes needed?

some systems like spark 3.3 need low version log4j, will encounter the conflict bug:

java.lang.NoSuchMethodError: org.apache.logging.slf4j.Log4jLoggerFactory: method 'void <init>()' not found

fix: #3320

Does this PR introduce any user-facing change?

no

How was this patch tested?

existing tests

@FANNG1 FANNG1 marked this pull request as draft May 10, 2024 02:46
@FANNG1 FANNG1 changed the title [MINOR] fix(client): shadow slf4j for client-java-runtime [MINOR] fix(client): shadow slf4j for client-java-runtime and spark-connector-runtime May 10, 2024
@FANNG1 FANNG1 self-assigned this May 10, 2024
@FANNG1 FANNG1 marked this pull request as ready for review May 10, 2024 03:32
@FANNG1 FANNG1 requested review from yuqi1129 and jerryshao May 10, 2024 03:32
@yuqi1129
Copy link
Contributor

@FANNG1
Can you create an issue and provide details of the bug?

@FANNG1 FANNG1 changed the title [MINOR] fix(client): shadow slf4j for client-java-runtime and spark-connector-runtime [#3320] fix(client): shadow slf4j for client-java-runtime and spark-connector-runtime May 10, 2024
@FANNG1
Copy link
Contributor Author

FANNG1 commented May 10, 2024

@FANNG1 Can you create an issue and provide details of the bug?

created corresponding issues, please check it again.

@@ -29,6 +29,7 @@ tasks.withType<ShadowJar>(ShadowJar::class.java) {
relocate("com.google", "com.datastrato.gravitino.shaded.com.google")
relocate("google", "com.datastrato.gravitino.shaded.google")
relocate("org.apache.hc", "com.datastrato.gravitino.shaded.org.apache.hc")
relocate("org.apache.logging.slf4j", "com.datastrato.gravitino.shaded.org.apache.logging.slf4j")
Copy link
Contributor

Choose a reason for hiding this comment

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

Since you already relocate the slf4j jar in client-java-runtime, do you need to relocate again in here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I checked by extracting the jar package, it doesn't exist, thanks for pointing this.

@FANNG1 FANNG1 changed the title [#3320] fix(client): shadow slf4j for client-java-runtime and spark-connector-runtime [#3320] fix(client): shadow slf4j for client-java-runtime May 10, 2024
@jerryshao jerryshao merged commit 4307d5f into apache:main May 10, 2024
22 checks passed
github-actions bot pushed a commit that referenced this pull request May 10, 2024
### What changes were proposed in this pull request?
shadow slf4j for client-java-runtime and spark-connector-runtime 

### Why are the changes needed?
some systems like spark 3.3 need low version log4j, will encounter the
conflict bug:

```
java.lang.NoSuchMethodError: org.apache.logging.slf4j.Log4jLoggerFactory: method 'void <init>()' not found
```

fix: #3320 

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

### How was this patch tested?
existing tests
diqiu50 pushed a commit to diqiu50/gravitino that referenced this pull request Jun 13, 2024
…he#3318)

### What changes were proposed in this pull request?
shadow slf4j for client-java-runtime and spark-connector-runtime 

### Why are the changes needed?
some systems like spark 3.3 need low version log4j, will encounter the
conflict bug:

```
java.lang.NoSuchMethodError: org.apache.logging.slf4j.Log4jLoggerFactory: method 'void <init>()' not found
```

fix: apache#3320 

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

### How was this patch tested?
existing tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug report] Log4jLoggerFactory package conflict when running on spark 3.3
3 participants