### 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 <fwang12@ebay.com> Co-authored-by: Fei Wang <cn.feiwang@gmail.com> Co-authored-by: Cheng Pan <pan3793@gmail.com> Signed-off-by: Shuang <lvshuang.xjs@alibaba-inc.com>
145 lines
5.0 KiB
XML
145 lines
5.0 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!--
|
|
~ Licensed to the Apache Software Foundation (ASF) under one or more
|
|
~ contributor license agreements. See the NOTICE file distributed with
|
|
~ this work for additional information regarding copyright ownership.
|
|
~ The ASF licenses this file to You under the Apache License, Version 2.0
|
|
~ (the "License"); you may not use this file except in compliance with
|
|
~ the License. You may obtain a copy of the License at
|
|
~
|
|
~ http://www.apache.org/licenses/LICENSE-2.0
|
|
~
|
|
~ Unless required by applicable law or agreed to in writing, software
|
|
~ distributed under the License is distributed on an "AS IS" BASIS,
|
|
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
~ See the License for the specific language governing permissions and
|
|
~ limitations under the License.
|
|
-->
|
|
<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>
|
|
<parent>
|
|
<groupId>org.apache.celeborn</groupId>
|
|
<artifactId>celeborn-parent_${scala.binary.version}</artifactId>
|
|
<version>${project.version}</version>
|
|
</parent>
|
|
|
|
<artifactId>celeborn-worker_${scala.binary.version}</artifactId>
|
|
<packaging>jar</packaging>
|
|
<name>Celeborn Worker</name>
|
|
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>org.apache.celeborn</groupId>
|
|
<artifactId>celeborn-common_${scala.binary.version}</artifactId>
|
|
<version>${project.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.celeborn</groupId>
|
|
<artifactId>celeborn-service_${scala.binary.version}</artifactId>
|
|
<version>${project.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>${leveldbjni.group}</groupId>
|
|
<artifactId>leveldbjni-all</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>io.netty</groupId>
|
|
<artifactId>netty-all</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.google.guava</groupId>
|
|
<artifactId>guava</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>commons-io</groupId>
|
|
<artifactId>commons-io</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.roaringbitmap</groupId>
|
|
<artifactId>RoaringBitmap</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.logging.log4j</groupId>
|
|
<artifactId>log4j-slf4j-impl</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.logging.log4j</groupId>
|
|
<artifactId>log4j-1.2-api</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.rocksdb</groupId>
|
|
<artifactId>rocksdbjni</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>me.bechberger</groupId>
|
|
<artifactId>ap-loader-all</artifactId>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>org.apache.celeborn</groupId>
|
|
<artifactId>celeborn-common_${scala.binary.version}</artifactId>
|
|
<version>${project.version}</version>
|
|
<type>test-jar</type>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.celeborn</groupId>
|
|
<artifactId>celeborn-client_${scala.binary.version}</artifactId>
|
|
<version>${project.version}</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.celeborn</groupId>
|
|
<artifactId>celeborn-service_${scala.binary.version}</artifactId>
|
|
<version>${project.version}</version>
|
|
<type>test-jar</type>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.celeborn</groupId>
|
|
<artifactId>celeborn-master_${scala.binary.version}</artifactId>
|
|
<version>${project.version}</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.mockito</groupId>
|
|
<artifactId>mockito-scala-scalatest_${scala.binary.version}</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.glassfish.jersey.test-framework</groupId>
|
|
<artifactId>jersey-test-framework-core</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
|
|
<artifactId>jersey-test-framework-provider-jetty</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.httpcomponents.client5</groupId>
|
|
<artifactId>httpclient5</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.httpcomponents.core5</groupId>
|
|
<artifactId>httpcore5</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.httpcomponents.core5</groupId>
|
|
<artifactId>httpcore5-h2</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
</dependencies>
|
|
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-dependency-plugin</artifactId>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</project>
|