SteveYurongSu commented on code in PR #12217:
URL: https://github.com/apache/iotdb/pull/12217#discussion_r1538941110


##########
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/env/ConfigNodeProcedureEnv.java:
##########
@@ -726,6 +730,55 @@ public Map<Integer, TPushPipeMetaResp> 
dropSinglePipeOnDataNodes(String pipeName
     return clientHandler.getResponseMap();
   }
 
+  public Map<Integer, TPushPipeMetaResp> pushMultiPipeMetaToDataNodes(
+      List<ByteBuffer> pipeMetaBinaryList) {
+    final Map<Integer, TDataNodeLocation> dataNodeLocationMap =
+        configManager.getNodeManager().getRegisteredDataNodeLocations();
+    final TPushMultiPipeMetaReq request =
+        new TPushMultiPipeMetaReq().setPipeMetas(pipeMetaBinaryList);
+
+    final AsyncClientHandler<TPushMultiPipeMetaReq, TPushPipeMetaResp> 
clientHandler =
+        new AsyncClientHandler<>(
+            DataNodeRequestType.PIPE_PUSH_MULTI_META, request, 
dataNodeLocationMap);
+    AsyncDataNodeClientPool.getInstance()
+        .sendAsyncRequestToDataNodeWithRetryAndTimeoutInMs(
+            clientHandler,
+            PipeConfig.getInstance().getPipeMetaSyncerSyncIntervalMinutes() * 
60 * 1000 * 2);
+    return clientHandler.getResponseMap();
+  }
+
+  public Map<Integer, TPushPipeMetaResp> dropMultiPipeOnDataNodes(List<String> 
pipeNamesToDrop) {
+    final Map<Integer, TDataNodeLocation> dataNodeLocationMap =
+        configManager.getNodeManager().getRegisteredDataNodeLocations();
+    final TPushMultiPipeMetaReq request =
+        new TPushMultiPipeMetaReq().setPipeNamesToDrop(pipeNamesToDrop);
+
+    final AsyncClientHandler<TPushMultiPipeMetaReq, TPushPipeMetaResp> 
clientHandler =
+        new AsyncClientHandler<>(
+            DataNodeRequestType.PIPE_PUSH_MULTI_META, request, 
dataNodeLocationMap);
+    AsyncDataNodeClientPool.getInstance()
+        .sendAsyncRequestToDataNodeWithRetryAndTimeoutInMs(
+            clientHandler,
+            PipeConfig.getInstance().getPipeMetaSyncerSyncIntervalMinutes() * 
60 * 1000 * 2);
+    return clientHandler.getResponseMap();

Review Comment:
   ```suggestion
               PipeConfig.getInstance().getPipeMetaSyncerSyncIntervalMinutes() 
* 60 * 1000 * 2 / 3);
       return clientHandler.getResponseMap();
   ```



##########
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/env/ConfigNodeProcedureEnv.java:
##########
@@ -755,6 +808,56 @@ public List<TSStatus> dropSingleTopicOnDataNode(String 
topicNameToDrop) {
         .collect(Collectors.toList());
   }
 
+  public Map<Integer, TPushTopicMetaResp> pushMultiTopicMetaToDataNodes(
+      List<ByteBuffer> topicMetaBinaryList) {
+    final Map<Integer, TDataNodeLocation> dataNodeLocationMap =
+        configManager.getNodeManager().getRegisteredDataNodeLocations();
+    final TPushMultiTopicMetaReq request =
+        new TPushMultiTopicMetaReq().setTopicMetas(topicMetaBinaryList);
+
+    final AsyncClientHandler<TPushMultiTopicMetaReq, TPushTopicMetaResp> 
clientHandler =
+        new AsyncClientHandler<>(
+            DataNodeRequestType.TOPIC_PUSH_MULTI_META, request, 
dataNodeLocationMap);
+    AsyncDataNodeClientPool.getInstance()
+        .sendAsyncRequestToDataNodeWithRetryAndTimeoutInMs(
+            clientHandler,
+            PipeConfig.getInstance().getPipeMetaSyncerSyncIntervalMinutes() * 
60 * 1000 * 2);

Review Comment:
   ```suggestion
               PipeConfig.getInstance().getPipeMetaSyncerSyncIntervalMinutes() 
* 60 * 1000 * 2 / 3);
   ```



-- 
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: [email protected]

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

Reply via email to