Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ceresdb-example/src/test/java/io/ceresdb/CeresDBTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public void comprehensiveTest() throws ExecutionException, InterruptedException

ok.stream().forEach(row -> {
LOG.info(
"Data: ts={}, tString={}, tInt64={}, fString={}, fBool={}, fDouble={}, fFloat={}, fInt64={}, fInt32={}, fInt16={},"
"======> Data: ts={}, tString={}, tInt64={}, fString={}, fBool={}, fDouble={}, fFloat={}, fInt64={}, fInt32={}, fInt16={},"
+ //
"fInt8={}, fUint64={}, fUint32={}, fUint16={}, fUint8={}, fTimestamp={}, fVarbinary={}", //
row.getColumn("ts").getValue().getTimestamp(), //
Expand Down
17 changes: 1 addition & 16 deletions ceresdb-protocol/src/main/java/io/ceresdb/Route.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,20 @@
public class Route {
private String table;
private Endpoint endpoint;
private Object ext;
private final AtomicLong lastHit = new AtomicLong(Clock.defaultClock().getTick());

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

public static Route of(final Endpoint endpoint) {
return of(null, endpoint, null);
return of(null, endpoint);
}

public static Route of(final String table, final Endpoint endpoint) {
return of(table, endpoint, null);
}

public static Route of(final String table, final Endpoint endpoint, final Object ext) {
final Route r = new Route();
r.table = table;
r.endpoint = endpoint;
r.ext = ext;
return r;
}

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

public Object getExt() {
return ext;
}

public void setExt(Object ext) {
this.ext = ext;
}

public long getLastHit() {
return lastHit.get();
}
Expand All @@ -78,7 +64,6 @@ public String toString() {
return "Route{" + //
"table='" + table + '\'' + //
", endpoint=" + endpoint + //
", ext=" + ext + //
", lastHit=" + lastHit.get() + //
'}';
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ private CompletableFuture<Storage.RouteResponse> invokeRpc(final Storage.RouteRe

private Route toRouteObj(final Storage.Route r) {
final Storage.Endpoint ep = Requires.requireNonNull(r.getEndpoint(), "CeresDB.Endpoint");
return Route.of(r.getTable(), Endpoint.of(ep.getIp(), ep.getPort()), r.getExt());
return Route.of(r.getTable(), Endpoint.of(ep.getIp(), ep.getPort()));
}
}
}
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
<okhttp.version>4.9.1</okhttp.version>
<okio.version>2.8.0</okio.version>
<project.encoding>UTF-8</project.encoding>
<proto-internal.version>0.3.0</proto-internal.version>
<proto-internal.version>1.0.0</proto-internal.version>
<protobuf.version>3.21.7</protobuf.version>
<!-- according to https://maven.apache.org/maven-ci-friendly.html -->
<revision>1.0.0-alpha</revision>
Expand Down