You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2022/08/02 06:50:48 UTC

[GitHub] [iotdb] qiaojialin commented on a diff in pull request #6860: [IOTDB-3982] Shielding heartbeat error log

qiaojialin commented on code in PR #6860:
URL: https://github.com/apache/iotdb/pull/6860#discussion_r935177478


##########
confignode/src/main/java/org/apache/iotdb/confignode/client/ConfigNodeClientPoolFactory.java:
##########
@@ -71,4 +73,42 @@ public KeyedObjectPool<TEndPoint, AsyncDataNodeInternalServiceClient> createClie
           new ClientPoolProperty.Builder<AsyncDataNodeInternalServiceClient>().build().getConfig());
     }
   }
+
+  public static class AsyncConfigNodeHeartbeatServiceClientPoolFactory
+      implements IClientPoolFactory<TEndPoint, AsyncConfigNodeHeartbeatServiceClient> {
+    @Override
+    public KeyedObjectPool<TEndPoint, AsyncConfigNodeHeartbeatServiceClient> createClientPool(
+        ClientManager<TEndPoint, AsyncConfigNodeHeartbeatServiceClient> manager) {
+      return new GenericKeyedObjectPool<>(
+          new AsyncConfigNodeHeartbeatServiceClient.Factory(
+              manager,
+              new ClientFactoryProperty.Builder()
+                  .setConnectionTimeoutMs(conf.getConnectionTimeoutInMS())
+                  .setRpcThriftCompressionEnabled(conf.isRpcThriftCompressionEnabled())
+                  .setSelectorNumOfAsyncClientManager(conf.getSelectorNumOfClientManager())
+                  .build()),
+          new ClientPoolProperty.Builder<AsyncConfigNodeHeartbeatServiceClient>()

Review Comment:
   Need to investigate how many threads it will create.



##########
confignode/src/main/java/org/apache/iotdb/confignode/client/ConfigNodeClientPoolFactory.java:
##########
@@ -71,4 +73,42 @@ public KeyedObjectPool<TEndPoint, AsyncDataNodeInternalServiceClient> createClie
           new ClientPoolProperty.Builder<AsyncDataNodeInternalServiceClient>().build().getConfig());
     }
   }
+
+  public static class AsyncConfigNodeHeartbeatServiceClientPoolFactory
+      implements IClientPoolFactory<TEndPoint, AsyncConfigNodeHeartbeatServiceClient> {
+    @Override
+    public KeyedObjectPool<TEndPoint, AsyncConfigNodeHeartbeatServiceClient> createClientPool(
+        ClientManager<TEndPoint, AsyncConfigNodeHeartbeatServiceClient> manager) {
+      return new GenericKeyedObjectPool<>(
+          new AsyncConfigNodeHeartbeatServiceClient.Factory(
+              manager,
+              new ClientFactoryProperty.Builder()
+                  .setConnectionTimeoutMs(conf.getConnectionTimeoutInMS())
+                  .setRpcThriftCompressionEnabled(conf.isRpcThriftCompressionEnabled())
+                  .setSelectorNumOfAsyncClientManager(conf.getSelectorNumOfClientManager())
+                  .build()),
+          new ClientPoolProperty.Builder<AsyncConfigNodeHeartbeatServiceClient>()

Review Comment:
   Need to investigate how many thread it will create.



-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org