jt2594838 commented on a change in pull request #1868:
URL: https://github.com/apache/iotdb/pull/1868#discussion_r512568565



##########
File path: server/src/main/java/org/apache/iotdb/db/service/RPCService.java
##########
@@ -61,12 +63,17 @@ public void initTProcessor() throws 
ClassNotFoundException,IllegalAccessExceptio
   public void initThriftServiceThread()
       throws IllegalAccessException, InstantiationException, 
ClassNotFoundException {
     IoTDBConfig config = IoTDBDescriptor.getInstance().getConfig();
-    thriftServiceThread = new ThriftServiceThread(processor,
-        getID().getName(), ThreadName.RPC_CLIENT.getName(),
-        config.getRpcAddress(), config.getRpcPort(), 
config.getRpcMaxConcurrentClientNum(),
-        config.getThriftServerAwaitTimeForStopService(),
-        new RPCServiceThriftHandler(impl),
-        
IoTDBDescriptor.getInstance().getConfig().isRpcThriftCompressionEnable());
+    try {
+      thriftServiceThread = new ThriftServiceThread(processor,
+          getID().getName(), ThreadName.RPC_CLIENT.getName(),
+          config.getRpcAddress(), config.getRpcPort(), 
config.getRpcMaxConcurrentClientNum(),
+          config.getThriftServerAwaitTimeForStopService(),
+          new RPCServiceThriftHandler(impl),
+          
IoTDBDescriptor.getInstance().getConfig().isRpcThriftCompressionEnable());
+    }
+    catch (RPCServiceException e) {
+      throw new IllegalAccessException(e.getMessage());

Review comment:
       Format here.
   
   Besides, instead of shutting down immediately, I would suggest a few 
retries, which may prevent test failures when the socket is not shut down 
timely.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to