Commit Graph

7 Commits

Author SHA1 Message Date
Fu Chen
3b9c2f04e7 [CELEBORN-1666] Bump scala-protoc from 1.0.6 to 1.0.7
### What changes were proposed in this pull request?

As title

### Why are the changes needed?

The version 1.0.6 is outdated and not available on Maven Central.

https://mvnrepository.com/artifact/com.thesamet/sbt-protoc_2.12_1.0

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

No

### How was this patch tested?

Pass CI

Closes #2842 from cfmcgrady/sbt-protoc.

Authored-by: Fu Chen <cfmcgrady@gmail.com>
Signed-off-by: Fu Chen <cfmcgrady@gmail.com>
2024-10-24 11:16:37 +08:00
Fu Chen
24b9b24712 [CELEBORN-1658] Add Git Commit Info and Build JDK Spec to sbt Manifest
### What changes were proposed in this pull request?

This PR  adding Git commit information and JVM build specifications to package manifest.

the `META-INF/MANIFEST.MF` before this PR:

```
Manifest-Version: 1.0
Specification-Title: celeborn-client-spark-3-shaded
Specification-Version: 0.6.0-SNAPSHOT
Specification-Vendor: org.apache.celeborn
Implementation-Title: celeborn-client-spark-3-shaded
Implementation-Version: 0.6.0-SNAPSHOT
Implementation-Vendor: org.apache.celeborn
Implementation-Vendor-Id: org.apache.celeborn
```

after this PR:

```
Manifest-Version: 1.0
Specification-Title: celeborn-client-spark-3-shaded
Specification-Version: 0.6.0-SNAPSHOT
Specification-Vendor: org.apache.celeborn
Implementation-Title: celeborn-client-spark-3-shaded
Implementation-Version: 0.6.0-SNAPSHOT
Implementation-Vendor: org.apache.celeborn
Implementation-Vendor-Id: org.apache.celeborn
Build-Jdk-Spec: 17.0.9
Build-Revision: 03247c19f1b38096a4080fe97e94dbeb20ebcbe9
Build-Branch: jdk-git-spec
Build-Time: 2024-10-18T17:53:02.723124+08:00[Asia/Shanghai]
```

```
Manifest-Version: 1.0
Specification-Title: celeborn-client-spark-3-shaded
Specification-Version: 0.6.0-SNAPSHOT
Specification-Vendor: org.apache.celeborn
Implementation-Title: celeborn-client-spark-3-shaded
Implementation-Version: 0.6.0-SNAPSHOT
Implementation-Vendor: org.apache.celeborn
Implementation-Vendor-Id: org.apache.celeborn
Build-Jdk-Spec: 17.0.9
Build-Revision: N/A
Build-Branch:
Build-Time: 2024-10-18T17:54:16.932121+08:00[Asia/Shanghai]
```

### Why are the changes needed?

As title.

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

No

### How was this patch tested?

local

Closes #2821 from cfmcgrady/jdk-git-spec.

Authored-by: Fu Chen <cfmcgrady@gmail.com>
Signed-off-by: mingji <fengmingxiao.fmx@alibaba-inc.com>
2024-10-21 11:05:38 +08:00
Wang, Fei
909d6c3b9c [CELEBORN-1477][FOLLOWUP] Upgrade openapi-generator to 7.8.0
### What changes were proposed in this pull request?
This pr is a followup for https://github.com/apache/celeborn/pull/2641

In above PR, I upgrade the version to 7.7.0, and there were two generated java files not with apache licenses.

And then I raised a PR in https://github.com/OpenAPITools/openapi-generator/pull/19273 to followup it, and it is released in https://github.com/OpenAPITools/openapi-generator/releases/tag/v7.8.0.

### Why are the changes needed?

Upgrade to the latest openapi-generator version to resolve the unlicensed java files.

### Does this PR introduce _any_ user-facing change?
No.

### How was this patch tested?
Existing GA.

Closes #2695 from turboFei/openapi_upgrade.

Authored-by: Wang, Fei <fwang12@ebay.com>
Signed-off-by: mingji <fengmingxiao.fmx@alibaba-inc.com>
2024-09-24 16:02:09 +08:00
Wang, Fei
1515ed38b2 [CELEBORN-1477] Using openapi-generator apache-httpclient library instead 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 <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>
2024-07-31 15:02:41 +08:00
Fei Wang
d698a69edc
[CELEBORN-1477][CIP-9] Refine the celeborn RESTful APIs
### What changes were proposed in this pull request?

This PR is for [CIP-9 Refine the celeborn RESTful APIs](https://docs.google.com/document/d/1LV2vV-w3XtlbJj2Vi4J77mt4IYCr40-8A_JncZLsHqs/edit?usp=sharing).

We leverage [openapi-generator](https://github.com/OpenAPITools/openapi-generator) to generate the client and model code.

### Why are the changes needed?

Celeborn has implemented RESTful APIs for monitoring and administrative operations on both master and worker endpoints. These APIs enable tasks such as configuration checks, status viewing of master/worker nodes, worker decommissioning/recommissioning, and more. They provide crucial insights and support for DevOps.
The primary concern with the existing API is the response content type, which is `text/plain` rather than the more widely accepted `application/json`. This mismatch makes integration with DevOps tools challenging, as these tools typically require JSON-formatted responses for seamless parsing and automation.
And I also saw the need for REST API evolution in[ Apache Celeborn CLI Proposal](https://cwiki.apache.org/confluence/display/CELEBORN/CIP-7+Celeborn+CLI).

### Does this PR introduce _any_ user-facing change?
This pr introduce  a new API namespace: `/api/v1`. This approach allows us to maintain the current API for compatibility while offering an improved version.

### How was this patch tested?
UT.

Closes #2599 from turboFei/cip_9_openapi.

Lead-authored-by: Fei Wang <fwang12@ebay.com>
Co-authored-by: Fei Wang <cn.feiwang@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2024-07-11 10:57:00 +08:00
Fu Chen
173950bca2 [CELEBORN-1194] Add sbt-pgp plugin for publishing signed artifacts
### What changes were proposed in this pull request?

As title

### Why are the changes needed?

As title

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

No

### How was this patch tested?

Pass GA

Closes #2184 from cfmcgrady/sbt-pgp-plugin.

Authored-by: Fu Chen <cfmcgrady@gmail.com>
Signed-off-by: Fu Chen <cfmcgrady@gmail.com>
2023-12-21 19:27:09 +08:00
Fu Chen
5f0295e9f3
[CELEBORN-836][BUILD] Initial support sbt
### What changes were proposed in this pull request?

This PR introduces the SBT build system implementation that operates independently from the current Maven build system. Different from https://github.com/apache/incubator-celeborn/pull/1627, the current implementation does not depend on `pom.xml`

The implementation enables packaging and testing functionalities for server-related modules and Spark-related modules using SBT.

For Flink-related build/test, sbt build documentation, continuous integration, and plugins, they will be submitted in separate PRs

### Why are the changes needed?

improve project build speed

packing the project.

```shell
$ ./build/sbt
sbt:celeborn> clean
[success] Total time: 1 s, completed 2023-7-25 16:36:12
sbt:celeborn> package
[success] Total time: 28 s, completed 2023-7-25 16:36:46
```

packing and shading the spark 3.3 client

```shell
$ ./build/sbt -Pspark-3.3
sbt:celeborn> clean
[success] Total time: 1 s, completed 2023-7-25 16:39:11
sbt:celeborn> project celeborn-client-spark-3-shaded
sbt:celeborn-client-spark-3-shaded> assembly
[success] Total time: 37 s, completed 2023-7-25 16:40:03
```

packing and shading the spark 2.4 client

```shell
$ ./build/sbt -Pspark-2.4
sbt:celeborn> clean
[success] Total time: 1 s, completed 2023-7-25 16:41:06
sbt:celeborn> project celeborn-client-spark-2-shaded
sbt:celeborn-client-spark-2-shaded> assembly
[success] Total time: 36 s, completed 2023-7-25 16:41:53
```

running server-related tests

```shell
$ ./build/sbt clean test
[success] Total time: 350 s (05:50), completed 2023-7-25 16:48:58
```

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

yes

### How was this patch tested?

tested locally

Closes #1757 from cfmcgrady/pure-sbt.

Authored-by: Fu Chen <cfmcgrady@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-07-28 10:40:04 +08:00