Skip to content

Commit

Permalink
chore: rename CeresDB to HoraeDB (#71)
Browse files Browse the repository at this point in the history
* replace ceresdb-proto to horaedb-proto

* rename module name

* rename ceresdb to horaedb

* fmt test code

* fix CI
  • Loading branch information
ZuLiangWang authored Dec 1, 2023
1 parent 18fc2d3 commit 035ead5
Show file tree
Hide file tree
Showing 212 changed files with 178 additions and 180 deletions.
40 changes: 20 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
run: mvn clean install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
&& sh ./tools/check_format.sh

test_ceresdb_common:
test_horaedb_common:
needs: check_format
runs-on: ubuntu-latest
steps:
Expand All @@ -30,11 +30,11 @@ jobs:
java-version: 1.8
- name: Maven Test
run: mvn clean install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
&& (mvn --projects ceresdb-common test
|| mvn --projects ceresdb-common test
|| mvn --projects ceresdb-common test)
&& (mvn --projects horaedb-common test
|| mvn --projects horaedb-common test
|| mvn --projects horaedb-common test)

test_ceresdb_grpc:
test_horaedb_grpc:
needs: check_format
runs-on: ubuntu-latest
steps:
Expand All @@ -45,11 +45,11 @@ jobs:
java-version: 1.8
- name: Maven Test
run: mvn clean install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
&& (mvn --projects ceresdb-grpc test
|| mvn --projects ceresdb-grpc test
|| mvn --projects ceresdb-grpc test)
&& (mvn --projects horaedb-grpc test
|| mvn --projects horaedb-grpc test
|| mvn --projects horaedb-grpc test)

test_ceresdb_protocol:
test_horaedb_protocol:
needs: check_format
runs-on: ubuntu-latest
steps:
Expand All @@ -60,11 +60,11 @@ jobs:
java-version: 1.8
- name: Maven Test
run: mvn clean install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
&& (mvn --projects ceresdb-protocol test
|| mvn --projects ceresdb-protocol test
|| mvn --projects ceresdb-protocol test)
&& (mvn --projects horaedb-protocol test
|| mvn --projects horaedb-protocol test
|| mvn --projects horaedb-protocol test)

test_ceresdb_sql:
test_horaedb_sql:
needs: check_format
runs-on: ubuntu-latest
steps:
Expand All @@ -75,11 +75,11 @@ jobs:
java-version: 1.8
- name: Maven Test
run: mvn clean install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
&& (mvn --projects ceresdb-sql test
|| mvn --projects ceresdb-sql test
|| mvn --projects ceresdb-sql test)
&& (mvn --projects horaedb-sql test
|| mvn --projects horaedb-sql test
|| mvn --projects horaedb-sql test)

test_ceresdb_javacc:
test_horaedb_javacc:
needs: check_format
runs-on: ubuntu-latest
steps:
Expand All @@ -90,6 +90,6 @@ jobs:
java-version: 1.8
- name: Maven Test
run: mvn clean install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
&& (mvn --projects ceresdb-sql-javacc test
|| mvn --projects ceresdb-sql-javacc test
|| mvn --projects ceresdb-sql-javacc test)
&& (mvn --projects horaedb-sql-javacc test
|| mvn --projects horaedb-sql-javacc test
|| mvn --projects horaedb-sql-javacc test)
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,14 @@ HoraeDB is a high-performance, distributed, schema-less, cloud native time-serie
```java
<dependency>
<groupId>io.ceresdb</groupId>
<artifactId>ceresdb-all</artifactId>
<artifactId>horaedb-all</artifactId>
<version>1.0.0-alpha</version>
</dependency>
```

## Init HoraeDB client
```java
final CeresDBOptions opts = CeresDBOptions.newBuilder("127.0.0.1", 8831, DIRECT) // CeresDB default grpc port 8831,use DIRECT RouteMode
final HoraeDBOptions opts = HoraeBOptions.newBuilder("127.0.0.1", 8831, DIRECT) // HoraeDB default grpc port 8831,use DIRECT RouteMode
.database("public") // use database for client, can be overridden by the RequestContext in request
// maximum retry times when write fails
// (only some error codes will be retried, such as the routing table failure)
Expand All @@ -119,9 +119,9 @@ final CeresDBOptions opts = CeresDBOptions.newBuilder("127.0.0.1", 8831, DIRECT)
// (only some error codes will be retried, such as the routing table failure)
.readMaxRetries(1).build();

final CeresDBClient client = new CeresDBClient();
final HoraeDBClient client = new HoraeDBClient();
if (!client.init(opts)) {
throw new IllegalStateException("Fail to start CeresDBClient");
throw new IllegalStateException("Fail to start HoraeDBClient");
}
```
For more configuration options, see [configuration](docs/configuration.md)
Expand Down
14 changes: 7 additions & 7 deletions README_CN.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# CeresDB Java Client
# HoraeDB Java Client

[![build](https://github.com/CeresDB/Horaedb-java-client/actions/workflows/build.yml/badge.svg)](https://github.com/CeresDB/Horaedb-java-client/actions/workflows/build.yml)
[![build](https://github.com/CeresDB/horaedb-client-java/actions/workflows/build.yml/badge.svg)](https://github.com/CeresDB/horaedb-client-java/actions/workflows/build.yml)
![License](https://img.shields.io/badge/license-Apache--2.0-green.svg)

## 介绍
Expand Down Expand Up @@ -98,23 +98,23 @@ HoraeDBClient 是 HoraeDB 的高性能 Java 版客户端。HoraeDB 是定位为
```java
<dependency>
<groupId>io.ceresdb</groupId>
<artifactId>ceresdb-all</artifactId>
<artifactId>horae-all</artifactId>
<version>1.0.0-alpha</version>
</dependency>
```

## 初始化 CeresDB Client
## 初始化 HoraeDB Client
```java
// HoraeDB options
final CeresDBOptions opts = CeresDBOptions.newBuilder("127.0.0.1", 8831, DIRECT) // 默认 gprc 端口号,DIRECT 模式
final HoraeOptions opts = HoraeOptions.newBuilder("127.0.0.1", 8831, DIRECT) // 默认 gprc 端口号,DIRECT 模式
.database("public") // Client所使用的database,可被RequestContext的database覆盖
.writeMaxRetries(1) // 写入失败重试次数上限(只有部分错误 code 才会重试,比如路由表失效)
.readMaxRetries(1) // 查询失败重试次数上限(只有部分错误 code 才会重试,比如路由表失效)
.build();

final CeresDBClient client = new CeresDBClient();
final HoraeClient client = new HoraeClient();
if (!client.init(opts)) {
throw new IllegalStateException("Fail to start CeresDBClient");
throw new IllegalStateException("Fail to start HoraeClient");
}
```
配置详情见 [configuration](docs/configuration.md)
Expand Down
24 changes: 0 additions & 24 deletions ceresdb-common/src/main/java/io/ceresdb/common/OptKeys.java

This file was deleted.

2 changes: 1 addition & 1 deletion docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The label below(modifier):
---
## 1.0.5 [2023-08-10]
- Features
- `RpcOptions` add new field `connectionMaxAgeMs`, which controls max time a connection can live, default 0(forever). [65](https://github.com/CeresDB/ceresdb-client-java/pull/65)
- `RpcOptions` add new field `connectionMaxAgeMs`, which controls max time a connection can live, default 0(forever). [65](https://github.com/CeresDB/horaedb-client-java/pull/65)

## 1.0.3 [2023-04-04]
- Fixes
Expand Down
2 changes: 1 addition & 1 deletion docs/CHANGELOG_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ X.Y.Z
---
## 1.0.5 [2023-08-10]
- Features
- `RpcOptions` 新增 `connectionMaxAgeMs` 字段, 一个 RPC 链接的最大生命周期,默认 0,即永不过期 [65](https://github.com/CeresDB/ceresdb-client-java/pull/65)
- `RpcOptions` 新增 `connectionMaxAgeMs` 字段, 一个 RPC 链接的最大生命周期,默认 0,即永不过期 [65](https://github.com/CeresDB/horaedb-client-java/pull/65)
## 1.0.3 [2023-04-04]
- Fixes
- 修复 `在非utf-8编码的jdk上使用中文乱码问题` [57](https://github.com/CeresDB/horaedb-client-java/pull/57)
Expand Down
16 changes: 8 additions & 8 deletions docs/configuration.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
## Global Options (System properties / Java -Dxxx)
| name | description |
| --- |----------------------------------------------------------------------------------------------------------------------------|
| "CeresDB.available_cpus" | Specify the number of CPU cores available to the SDK, and use all the number of CPUs in the current environment by default |
| "CeresDB.grpc.conn.failures.reset_threshold" | Threshold gRPC reset connection, default is 3 |
| "CeresDB.client.read.write.rw_logging" | Simple log output switch for read and write, default is true |
| "CeresDB.client.write.collect_wrote_detail" | Whether to keep the written table list after the write is successful, default is false |
| "CeresDB.client.use_os_signal" | Whether to use OS Signal, SIGUSR2 is used by default |
| "CeresDB.signal.out_dir" | The Signal receiver outputs the content to the specified disk directory, which defaults to the process startup directory |
| "CeresDB.rpc.write.limit_percent" | RPC adaptive limit `write` ratio (default 0.7), the rest is reserved for `read` |
| "CeresDB.reporter.period_minutes" | Metrics reporter timing output period,default is 30 minutes |
| "HoraeDB.available_cpus" | Specify the number of CPU cores available to the SDK, and use all the number of CPUs in the current environment by default |
| "HoraeDB.grpc.conn.failures.reset_threshold" | Threshold gRPC reset connection, default is 3 |
| "HoraeDB.client.read.write.rw_logging" | Simple log output switch for read and write, default is true |
| "HoraeDB.client.write.collect_wrote_detail" | Whether to keep the written table list after the write is successful, default is false |
| "HoraeDB.client.use_os_signal" | Whether to use OS Signal, SIGUSR2 is used by default |
| "HoraeDB.signal.out_dir" | The Signal receiver outputs the content to the specified disk directory, which defaults to the process startup directory |
| "HoraeDB.rpc.write.limit_percent" | RPC adaptive limit `write` ratio (default 0.7), the rest is reserved for `read` |
| "HoraeDB.reporter.period_minutes" | Metrics reporter timing output period,default is 30 minutes |

## HoraeDBOptions
| name | description |
Expand Down
4 changes: 2 additions & 2 deletions docs/metrics_and_display.md
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ write_limiter_acquire_wait_time

### Display demo:
```
--- CeresDBClient ---
--- HoraeDBClient ---
id=1
version=1.0.0.Final
clusterAddress=127.0.0.1:8831
Expand All @@ -583,7 +583,7 @@ routeCache.size=1
--- GrpcClient ---
started=true
opts=RpcOptions{defaultRpcTimeout=10000, rpcThreadPoolSize=0, rpcThreadPoolQueueSize=16, maxInboundMessageSize=67108864, flowControlWindow=67108864, idleTimeoutSeconds=300, keepAliveTimeSeconds=3, keepAliveTimeoutSeconds=3, keepAliveWithoutCalls=true, openVegasLimiter=true, vegasInitialLimit=50, blockOnLimit=false}
connectionObservers=[io.ceresdb.CeresDBClient$RpcConnectionObserver@465f5824]
connectionObservers=[io.ceresdb.HoraeDBClient$RpcConnectionObserver@465f5824]
asyncPool=DirectExecutor{name='grpc_executor'}
interceptors=[io.ceresdb.rpc.interceptors.MetricInterceptor@62b47ad1, io.ceresdb.rpc.interceptors.ClientRequestLimitInterceptor@77533e32, io.ceresdb.rpc.interceptors.ContextToHeadersInterceptor@1a52427d]
managedChannelPool={127.0.0.1:8831=ManagedChannelOrphanWrapper{delegate=ManagedChannelImpl{logId=1, target=127.0.0.1:8831}}}
Expand Down
2 changes: 1 addition & 1 deletion docs/read.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ CompletableFuture<Result<SqlQueryOk, Err>> sqlQuery(SqlQueryRequest req, Context
### Parameters
| name | desc |
|-----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `SqlQueryRequest req` | Query request, including `tables` and `sql` fields, `tables` is a suggested field, if filled in, there will be more efficient routing, if not filled, the sql statement will be automatically parsed for routing (need to introduce the ceresdb-sql module) |
| `SqlQueryRequest req` | Query request, including `tables` and `sql` fields, `tables` is a suggested field, if filled in, there will be more efficient routing, if not filled, the sql statement will be automatically parsed for routing (need to introduce the horaedb-sql module) |
| `Context ctx` | Call context, to achieve some special requirements, the content in ctx will be written into the headers metadata of gRPC |

### Return
Expand Down
14 changes: 7 additions & 7 deletions ceresdb-all/pom.xml → horaedb-all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,37 @@
<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>
<artifactId>ceresdb-client</artifactId>
<artifactId>horaedb-client</artifactId>
<groupId>io.ceresdb</groupId>
<version>${revision}</version>
</parent>

<artifactId>ceresdb-all</artifactId>
<artifactId>horaedb-all</artifactId>

<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>ceresdb-common</artifactId>
<artifactId>horaedb-common</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>ceresdb-grpc</artifactId>
<artifactId>horaedb-grpc</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>ceresdb-protocol</artifactId>
<artifactId>horaedb-protocol</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>ceresdb-rpc</artifactId>
<artifactId>horaedb-rpc</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>ceresdb-sql-javacc</artifactId>
<artifactId>horaedb-sql-javacc</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
Expand Down
4 changes: 2 additions & 2 deletions ceresdb-common/pom.xml → horaedb-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<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>
<artifactId>ceresdb-client</artifactId>
<artifactId>horaedb-client</artifactId>
<groupId>io.ceresdb</groupId>
<version>${revision}</version>
</parent>

<artifactId>ceresdb-common</artifactId>
<artifactId>horaedb-common</artifactId>

<dependencies>
<!-- metrics -->
Expand Down
24 changes: 24 additions & 0 deletions horaedb-common/src/main/java/io/ceresdb/common/OptKeys.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Copyright 2023 CeresDB Project Authors. Licensed under Apache-2.0.
*/
package io.ceresdb.common;

/**
* System properties option keys
*
*/
public final class OptKeys {

public static final String OS_NAME = "os.name";
public static final String RW_LOGGING = "HoraeDB.client.read.write.rw_logging";
public static final String COLLECT_WROTE_DETAIL = "HoraeDB.client.write.collect_wrote_detail";
public static final String USE_OS_SIGNAL = "HoraeDB.client.use_os_signal";
public static final String REPORT_PERIOD = "HoraeDB.reporter.period_minutes";
public static final String SIG_OUT_DIR = "HoraeDB.signal.out_dir";
public static final String GRPC_CONN_RESET_THRESHOLD = "HoraeDB.grpc.conn.failures.reset_threshold";
public static final String AVAILABLE_CPUS = "HoraeDB.available_cpus";
public static final String WRITE_LIMIT_PERCENT = "HoraeDB.rpc.write.limit_percent";

private OptKeys() {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class Cpus {
/**
* The configured number of available processors. The default is
* {@link Runtime#availableProcessors()}. This can be overridden
* by setting the system property "CeresDB.available_cpus".
* by setting the system property "HoraeDB.available_cpus".
*
* @return available cpus num
*/
Expand Down
6 changes: 3 additions & 3 deletions ceresdb-example/pom.xml → horaedb-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
<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>
<artifactId>ceresdb-client</artifactId>
<artifactId>horaedb-client</artifactId>
<groupId>io.ceresdb</groupId>
<version>${revision}</version>
</parent>

<artifactId>ceresdb-example</artifactId>
<artifactId>horaedb-example</artifactId>

<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>ceresdb-all</artifactId>
<artifactId>horaedb-all</artifactId>
<version>${project.version}</version>
</dependency>

Expand Down
Loading

0 comments on commit 035ead5

Please sign in to comment.