diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/metrics/MetricsAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/metrics/MetricsAPI.java index 2c94c7b6dd..35519cc45e 100644 --- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/metrics/MetricsAPI.java +++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/metrics/MetricsAPI.java @@ -76,7 +76,7 @@ public String system() { @Timed @Path("backend") @Produces(APPLICATION_JSON_WITH_CHARSET) -// @RolesAllowed({"admin", "$owner= $action=metrics_read"}) +// @RolesAllowed({"admin", "$owner= $action=metrics_read"}) public String backend(@Context GraphManager manager) { Map> results = InsertionOrderUtil.newMap(); for (String graph : manager.graphs()) { diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/config/ServerOptions.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/config/ServerOptions.java index 0ba34e8f5a..a384e24d7c 100644 --- a/hugegraph-api/src/main/java/com/baidu/hugegraph/config/ServerOptions.java +++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/config/ServerOptions.java @@ -227,8 +227,8 @@ public static synchronized ServerOptions instance() { "auth.remote_url", "If the address is empty, it provide auth service, " + "otherwise it is auth client and also provide auth service " + - "through rpc forwarding. The remote url can set multiple " + - "addresses, which are linked by ','.", + "through rpc forwarding. The remote url can be set to " + + "multiple addresses, which are linked by ','.", null, "" ); @@ -280,7 +280,7 @@ public static synchronized ServerOptions instance() { new ConfigOption<>( "rpc.client_load_balancer", "The rpc client uses a load-balancing algorithm to " + - "configure the addresses of multiple rpc servers. Default " + + "access multiple rpc servers in one cluster. Default " + "value is 'consistentHash', means forwording by request " + "parameters.", allowValues("random", "localPref", "roundRobin", diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/core/GraphManager.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/core/GraphManager.java index 8f3bf75d50..a94f0a788e 100644 --- a/hugegraph-api/src/main/java/com/baidu/hugegraph/core/GraphManager.java +++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/core/GraphManager.java @@ -174,7 +174,9 @@ private RpcServerProvider startRpcServer(HugeConfig conf) { } private void destoryRpcServer() { - this.rpcServerProvider.destroy(); + if (this.rpcServerProvider != null) { + this.rpcServerProvider.destroy(); + } } private HugeAuthenticator authenticator() { diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/rpc/SofaRpcServer.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/rpc/SofaRpcServer.java index 56ec856b63..0496ff8a5d 100644 --- a/hugegraph-api/src/main/java/com/baidu/hugegraph/rpc/SofaRpcServer.java +++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/rpc/SofaRpcServer.java @@ -58,8 +58,8 @@ public SofaRpcServer(HugeConfig conf, RpcProviderConfig providerConfig) { public void exportAll() { if (MapUtils.isEmpty(this.providerConfigs)) { - throw new RpcException("The server provider config map can't be " + - "empty"); + throw new RpcException( + "The server provider config map can't be empty"); } for (ProviderConfig providerConfig : this.providerConfigs.values()) { providerConfig.setServer(this.serverConfig);