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


##########
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);
+    return clientHandler.getResponseMap();
+  }
+
+  public Map<Integer, TPushTopicMetaResp> 
dropMultiTopicOnDataNodes(List<String> topicNamesToDrop) {
+    final Map<Integer, TDataNodeLocation> dataNodeLocationMap =
+        configManager.getNodeManager().getRegisteredDataNodeLocations();
+    final TPushMultiTopicMetaReq request =
+        new TPushMultiTopicMetaReq().setTopicNamesToDrop(topicNamesToDrop);
+
+    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:
   check others implementation



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