Skip to content
This repository was archived by the owner on Mar 12, 2026. It is now read-only.

Commit 8e0c67e

Browse files
author
mrrtree
authored
feat: update proto to 1.0.0 and remove Ext in Route (#45)
1 parent 26398be commit 8e0c67e

4 files changed

Lines changed: 4 additions & 19 deletions

File tree

ceresdb-example/src/test/java/io/ceresdb/CeresDBTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ public void comprehensiveTest() throws ExecutionException, InterruptedException
159159

160160
ok.stream().forEach(row -> {
161161
LOG.info(
162-
"Data: ts={}, tString={}, tInt64={}, fString={}, fBool={}, fDouble={}, fFloat={}, fInt64={}, fInt32={}, fInt16={},"
162+
"======> Data: ts={}, tString={}, tInt64={}, fString={}, fBool={}, fDouble={}, fFloat={}, fInt64={}, fInt32={}, fInt16={},"
163163
+ //
164164
"fInt8={}, fUint64={}, fUint32={}, fUint16={}, fUint8={}, fTimestamp={}, fVarbinary={}", //
165165
row.getColumn("ts").getValue().getTimestamp(), //

ceresdb-protocol/src/main/java/io/ceresdb/Route.java

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,20 @@
1515
public class Route {
1616
private String table;
1717
private Endpoint endpoint;
18-
private Object ext;
1918
private final AtomicLong lastHit = new AtomicLong(Clock.defaultClock().getTick());
2019

2120
public static Route invalid(final String table) {
2221
throw new IllegalStateException("Unexpected, invalid route for table: " + table);
2322
}
2423

2524
public static Route of(final Endpoint endpoint) {
26-
return of(null, endpoint, null);
25+
return of(null, endpoint);
2726
}
2827

2928
public static Route of(final String table, final Endpoint endpoint) {
30-
return of(table, endpoint, null);
31-
}
32-
33-
public static Route of(final String table, final Endpoint endpoint, final Object ext) {
3429
final Route r = new Route();
3530
r.table = table;
3631
r.endpoint = endpoint;
37-
r.ext = ext;
3832
return r;
3933
}
4034

@@ -54,14 +48,6 @@ public void setEndpoint(Endpoint endpoint) {
5448
this.endpoint = endpoint;
5549
}
5650

57-
public Object getExt() {
58-
return ext;
59-
}
60-
61-
public void setExt(Object ext) {
62-
this.ext = ext;
63-
}
64-
6551
public long getLastHit() {
6652
return lastHit.get();
6753
}
@@ -78,7 +64,6 @@ public String toString() {
7864
return "Route{" + //
7965
"table='" + table + '\'' + //
8066
", endpoint=" + endpoint + //
81-
", ext=" + ext + //
8267
", lastHit=" + lastHit.get() + //
8368
'}';
8469
}

ceresdb-protocol/src/main/java/io/ceresdb/RouterClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ private CompletableFuture<Storage.RouteResponse> invokeRpc(final Storage.RouteRe
410410

411411
private Route toRouteObj(final Storage.Route r) {
412412
final Storage.Endpoint ep = Requires.requireNonNull(r.getEndpoint(), "CeresDB.Endpoint");
413-
return Route.of(r.getTable(), Endpoint.of(ep.getIp(), ep.getPort()), r.getExt());
413+
return Route.of(r.getTable(), Endpoint.of(ep.getIp(), ep.getPort()));
414414
}
415415
}
416416
}

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
<okhttp.version>4.9.1</okhttp.version>
7575
<okio.version>2.8.0</okio.version>
7676
<project.encoding>UTF-8</project.encoding>
77-
<proto-internal.version>0.3.0</proto-internal.version>
77+
<proto-internal.version>1.0.0</proto-internal.version>
7878
<protobuf.version>3.21.7</protobuf.version>
7979
<!-- according to https://maven.apache.org/maven-ci-friendly.html -->
8080
<revision>1.0.0-alpha</revision>

0 commit comments

Comments
 (0)