1717package io .greptime .bench ;
1818
1919import io .greptime .GreptimeDB ;
20+ import io .greptime .common .util .SystemPropertyUtil ;
2021import io .greptime .options .GreptimeOptions ;
2122import io .greptime .quickstart .query .QueryJDBCQuickStart ;
23+ import io .greptime .rpc .RpcOptions ;
2224import java .io .IOException ;
2325import java .util .Properties ;
2426import org .slf4j .Logger ;
@@ -38,11 +40,23 @@ public static GreptimeDB connect() {
3840 } catch (IOException e ) {
3941 throw new RuntimeException (e );
4042 }
41- String database = (String ) prop .get ("db.database" );
42- String endpointsStr = prop .getProperty ("db.endpoints" );
43+
44+ String database = SystemPropertyUtil .get ("db.database" );
45+ if (database == null ) {
46+ database = (String ) prop .get ("db.database" );
47+ }
48+
49+ String endpointsStr = SystemPropertyUtil .get ("db.endpoints" );
50+ if (endpointsStr == null ) {
51+ endpointsStr = prop .getProperty ("db.endpoints" );
52+ }
53+
4354 String [] endpoints = endpointsStr .split ("," );
55+ RpcOptions rpcOptions = RpcOptions .newDefault ();
56+ rpcOptions .setDefaultRpcTimeout (60 * 1000 );
4457 GreptimeOptions opts = GreptimeOptions .newBuilder (endpoints , database )
4558 .writeMaxRetries (0 )
59+ .rpcOptions (rpcOptions )
4660 .defaultStreamMaxWritePointsPerSecond (Integer .MAX_VALUE )
4761 .maxInFlightWritePoints (Integer .MAX_VALUE )
4862 .useZeroCopyWriteInBulkWrite (true )
0 commit comments