healchow commented on code in PR #7068:
URL: https://github.com/apache/inlong/pull/7068#discussion_r1057214038
##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/consume/ConsumePulsarOperator.java:
##########
@@ -103,7 +109,22 @@ public InlongConsumeInfo getFromEntity(InlongConsumeEntity
entity) {
ConsumePulsarDTO dto =
ConsumePulsarDTO.getFromJson(entity.getExtParams());
CommonBeanUtils.copyProperties(dto, consumeInfo);
}
-
+ String groupId = entity.getInlongGroupId();
+ InlongGroupInfo groupInfo = groupService.get(groupId);
+ String clusterTag = groupInfo.getInlongClusterTag();
+ List<ClusterInfo> clusterInfos =
clusterService.listByTagAndType(clusterTag, ClusterType.PULSAR);
+ StringBuilder adminUrls = new StringBuilder();
+ StringBuilder serverUrls = new StringBuilder();
+ String topic = entity.getTopic();
+ Preconditions.checkNotEmpty(clusterInfos, "pulsar cluster not exist
for groupId=" + groupId);
+ for (ClusterInfo clusterInfo : clusterInfos) {
+ PulsarClusterInfo pulsarCluster = (PulsarClusterInfo) clusterInfo;
+
adminUrls.append(pulsarCluster.getAdminUrl()).append(InlongConstants.SEMICOLON);
Review Comment:
Maybe these clusters are not the same cluster.
For example, cluster A and cluster B do not communicate. If their admin urls
and service urls are spliced together, problems will occur.
--
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]