-
Notifications
You must be signed in to change notification settings - Fork 382
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
[CELEBORN-1477][FOLLOWUP] Fix shaded celeborn-openapi-client dependency lack issue #2640
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aa7e092
to
08452ae
Compare
jersey common jvnet work jersey-common shade save fix save deps order sbt native-image maven
08452ae
to
2124882
Compare
Maven:
SBT:
Note that: for sbt build, the
|
cc @pan3793 how do you think about? |
favor to #2641 |
RexXiong
pushed a commit
that referenced
this pull request
Jul 31, 2024
…nstead of `jersey2` ### What changes were proposed in this pull request? We used `jersey2` library for celeborn-openapi-client before, and I found that there is dependencies lack issue for shaded celeborn-openapi-client. I tried to raise a [PR #2640] to fix it, but seems It is difficult to maintain the dependencies transition from jersey dependencies. And I received the suggestion from pan to migrate the library from jersey2 to `apache-httpclient`. FYI: for https://openapi-generator.tech/docs/generators/java/ <img width="500" alt="image" src="https://github.com/user-attachments/assets/d102a7c9-46cd-4fd7-a2a0-7396a815776d"> To leverage the latest openapi-generator plugin, I upgrade the openapi-generator version to latest 7.7.0 and it requires JDK11+. Due celeborn does not drop the Java8 support so far, so I include the generated code into repo and add user guide for re-generation. ### Why are the changes needed? To fix dependencies leak issue and maintain the dependencies easily. ### Does this PR introduce _any_ user-facing change? No, this SDK has not been released, so no user-facing change. ### How was this patch tested? Testing with sample maven project. pom.xml: ``` <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>org.example</groupId> <artifactId>test_openapi</artifactId> <version>1.0-SNAPSHOT</version> <properties> <maven.compiler.source>8</maven.compiler.source> <maven.compiler.target>8</maven.compiler.target> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <dependencies> <dependency> <groupId>org.apache.celeborn</groupId> <artifactId>celeborn-openapi-client_2.12</artifactId> <version>0.6.0-SNAPSHOT</version> </dependency> </dependencies> </project> ``` Testing code: ``` package org.example; import org.apache.celeborn.rest.v1.master.MasterApi; import org.apache.celeborn.rest.v1.master.WorkerApi; import org.apache.celeborn.rest.v1.master.invoker.ApiClient; public class Main { public static void main(String[] args) throws Exception { String cmUrl = "http://***:9098"; MasterApi masterApi = new MasterApi(new ApiClient().setBasePath(cmUrl)); System.out.println(masterApi.getMasterGroupInfo().getLeader().getAddress().split(":")[0]); WorkerApi workerApi = new WorkerApi(new ApiClient().setBasePath(cmUrl)); System.out.println(workerApi.getWorkers()); System.out.println(workerApi.getWorkerEvents()); } } ``` ``` java -Dfile.encoding=UTF-8 -classpath /Users/fwang12/todo/test_openapi/target/classes:/Users/fwang12/todo/celeborn/openapi/openapi-client/target/celeborn-openapi-client_2.12-0.6.0-SNAPSHOT.jar org.example.Main ``` <img width="1727" alt="image" src="https://github.com/user-attachments/assets/2da8b126-be96-4c37-9a33-ba196024f2ba"> Closes #2641 from turboFei/appache_httpclient. Lead-authored-by: Wang, Fei <[email protected]> Co-authored-by: Fei Wang <[email protected]> Co-authored-by: Cheng Pan <[email protected]> Signed-off-by: Shuang <[email protected]>
wankunde
pushed a commit
to wankunde/celeborn
that referenced
this pull request
Oct 11, 2024
…nstead of `jersey2` ### What changes were proposed in this pull request? We used `jersey2` library for celeborn-openapi-client before, and I found that there is dependencies lack issue for shaded celeborn-openapi-client. I tried to raise a [PR apache#2640] to fix it, but seems It is difficult to maintain the dependencies transition from jersey dependencies. And I received the suggestion from pan to migrate the library from jersey2 to `apache-httpclient`. FYI: for https://openapi-generator.tech/docs/generators/java/ <img width="500" alt="image" src="https://github.com/user-attachments/assets/d102a7c9-46cd-4fd7-a2a0-7396a815776d"> To leverage the latest openapi-generator plugin, I upgrade the openapi-generator version to latest 7.7.0 and it requires JDK11+. Due celeborn does not drop the Java8 support so far, so I include the generated code into repo and add user guide for re-generation. ### Why are the changes needed? To fix dependencies leak issue and maintain the dependencies easily. ### Does this PR introduce _any_ user-facing change? No, this SDK has not been released, so no user-facing change. ### How was this patch tested? Testing with sample maven project. pom.xml: ``` <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>org.example</groupId> <artifactId>test_openapi</artifactId> <version>1.0-SNAPSHOT</version> <properties> <maven.compiler.source>8</maven.compiler.source> <maven.compiler.target>8</maven.compiler.target> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <dependencies> <dependency> <groupId>org.apache.celeborn</groupId> <artifactId>celeborn-openapi-client_2.12</artifactId> <version>0.6.0-SNAPSHOT</version> </dependency> </dependencies> </project> ``` Testing code: ``` package org.example; import org.apache.celeborn.rest.v1.master.MasterApi; import org.apache.celeborn.rest.v1.master.WorkerApi; import org.apache.celeborn.rest.v1.master.invoker.ApiClient; public class Main { public static void main(String[] args) throws Exception { String cmUrl = "http://***:9098"; MasterApi masterApi = new MasterApi(new ApiClient().setBasePath(cmUrl)); System.out.println(masterApi.getMasterGroupInfo().getLeader().getAddress().split(":")[0]); WorkerApi workerApi = new WorkerApi(new ApiClient().setBasePath(cmUrl)); System.out.println(workerApi.getWorkers()); System.out.println(workerApi.getWorkerEvents()); } } ``` ``` java -Dfile.encoding=UTF-8 -classpath /Users/fwang12/todo/test_openapi/target/classes:/Users/fwang12/todo/celeborn/openapi/openapi-client/target/celeborn-openapi-client_2.12-0.6.0-SNAPSHOT.jar org.example.Main ``` <img width="1727" alt="image" src="https://github.com/user-attachments/assets/2da8b126-be96-4c37-9a33-ba196024f2ba"> Closes apache#2641 from turboFei/appache_httpclient. Lead-authored-by: Wang, Fei <[email protected]> Co-authored-by: Fei Wang <[email protected]> Co-authored-by: Cheng Pan <[email protected]> Signed-off-by: Shuang <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
I am working on the integration with our devOps tool integration, and found issues due to dependency lack in the shaded jar:
Likes:
In this PR, I include all the necessary dependencies.
Why are the changes needed?
Fix above issues.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Testing with sample maven project.
pom.xml:
Testing code: