File tree Expand file tree Collapse file tree 5 files changed +20
-9
lines changed
Expand file tree Collapse file tree 5 files changed +20
-9
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ dependencies {
3434 api " com.cedarsoftware:java-util:1.8.0"
3535 api group : ' org.apache.httpcomponents' , name : ' httpasyncclient' , version : ' 4.1.1'
3636 api group : ' commons-codec' , name : ' commons-codec' , version : ' 1.11'
37- api group : ' com.beust' , name : ' jcommander' , version : ' 1.72 '
37+ api group : ' com.beust' , name : ' jcommander' , version : ' 1.78 '
3838 api group : ' com.typesafe' , name : ' config' , version : ' 1.3.2'
3939 api group : leveldbGroup, name : leveldbName, version : leveldbVersion
4040 api group : ' org.rocksdb' , name : ' rocksdbjni' , version : ' 5.15.10'
Original file line number Diff line number Diff line change @@ -58,7 +58,9 @@ dependencies {
5858 compileOnly group : ' javax.portlet' , name : ' portlet-api' , version : ' 3.0.1'
5959
6060 implementation " io.vavr:vavr:0.9.2"
61- implementation group : ' org.pf4j' , name : ' pf4j' , version : ' 2.5.0'
61+ implementation (group : ' org.pf4j' , name : ' pf4j' , version : ' 3.10.0' ) {
62+ exclude group : " org.slf4j" , module : " slf4j-api"
63+ }
6264
6365 testImplementation group : ' org.springframework' , name : ' spring-test' , version : ' 5.2.0.RELEASE'
6466 testImplementation group : ' org.springframework' , name : ' spring-web' , version : ' 5.2.0.RELEASE'
Original file line number Diff line number Diff line change 11package org .tron .common .client ;
22
3+ import io .grpc .LoadBalancerRegistry ;
34import io .grpc .ManagedChannel ;
45import io .grpc .ManagedChannelBuilder ;
6+ import io .grpc .internal .PickFirstLoadBalancerProvider ;
57import org .tron .api .DatabaseGrpc ;
68import org .tron .api .GrpcAPI .EmptyMessage ;
79import org .tron .api .GrpcAPI .NumberMessage ;
@@ -13,6 +15,12 @@ public class DatabaseGrpcClient {
1315 private final ManagedChannel channel ;
1416 private final DatabaseGrpc .DatabaseBlockingStub databaseBlockingStub ;
1517
18+ static {
19+ LoadBalancerRegistry
20+ .getDefaultRegistry ()
21+ .register (new PickFirstLoadBalancerProvider ());
22+ }
23+
1624 public DatabaseGrpcClient (String host , int port ) {
1725 channel = ManagedChannelBuilder .forAddress (host , port )
1826 .usePlaintext ()
Original file line number Diff line number Diff line change @@ -253,14 +253,15 @@ private static void printVersion() {
253253 } catch (IOException e ) {
254254 logger .error (e .getMessage ());
255255 }
256- JCommander .getConsole ().println ("OS : " + System .getProperty ("os.name" ));
257- JCommander .getConsole ().println ("JVM : " + System .getProperty ("java.vendor" ) + " "
256+ JCommander jCommander = new JCommander ();
257+ jCommander .getConsole ().println ("OS : " + System .getProperty ("os.name" ));
258+ jCommander .getConsole ().println ("JVM : " + System .getProperty ("java.vendor" ) + " "
258259 + System .getProperty ("java.version" ) + " " + System .getProperty ("os.arch" ));
259260 if (!noGitProperties ) {
260- JCommander .getConsole ().println ("Git : " + properties .getProperty ("git.commit.id" ));
261+ jCommander .getConsole ().println ("Git : " + properties .getProperty ("git.commit.id" ));
261262 }
262- JCommander .getConsole ().println ("Version : " + Version .getVersion ());
263- JCommander .getConsole ().println ("Code : " + Version .VERSION_CODE );
263+ jCommander .getConsole ().println ("Version : " + Version .getVersion ());
264+ jCommander .getConsole ().println ("Code : " + Version .VERSION_CODE );
264265 }
265266
266267 public static void printHelp (JCommander jCommander ) {
@@ -304,7 +305,7 @@ public static void printHelp(JCommander jCommander) {
304305 helpStr .append (tmpOptionDesc );
305306 }
306307 }
307- JCommander .getConsole ().println (helpStr .toString ());
308+ jCommander .getConsole ().println (helpStr .toString ());
308309 }
309310
310311 public static String upperFirst (String name ) {
Original file line number Diff line number Diff line change 11apply plugin : ' com.google.protobuf'
22
33def protobufVersion = ' 3.25.5'
4- def grpcVersion = ' 1.52.1 '
4+ def grpcVersion = ' 1.60.0 '
55
66dependencies {
77 api group : ' com.google.protobuf' , name : ' protobuf-java' , version : protobufVersion
You can’t perform that action at this time.
0 commit comments