yuanboliu commented on a change in pull request #375:
URL: https://github.com/apache/incubator-tubemq/pull/375#discussion_r549629678
##########
File path:
tubemq-manager/src/main/java/org/apache/tubemq/manager/service/NodeService.java
##########
@@ -413,4 +415,32 @@ public AddBrokerResult
addBrokersToClusterWithId(AddBrokersReq req, NodeEntry ma
}
return null;
}
+
+ public TubeMQResult cloneTopicToBrokers(CloneTopicReq req, NodeEntry
master) throws Exception {
+
+ // 1 query topic config
+ TubeHttpTopicInfoList topicInfoList = requestTopicConfigInfo(master,
req.getSourceTopicName());
+
+ if (topicInfoList == null) {
+ return TubeMQResult.getErrorResult("no such topic");
+ }
+
+ // 2 if there's no specific broker ids then clone to all of the brokers
+ List<Integer> brokerId = req.getBrokerId();
+
+ if (CollectionUtils.isEmpty(brokerId)) {
+ TubeHttpBrokerInfoList brokerInfoList =
requestClusterNodeStatus(master);
+ if (brokerInfoList != null) {
+ brokerId = brokerInfoList.getAllBrokerIdList();
Review comment:
make sure all brokers are in configurable status
TubeHttpBrokerInfoList.getConfigurableBrokerIdList
----------------------------------------------------------------
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]