You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2022/12/26 12:07:21 UTC
[GitHub] [inlong] healchow commented on a diff in pull request #7068: [INLONG-7067][Manager] Data consumption details provide serverUrl, adminUrl and topic information
healchow commented on code in PR #7068:
URL: https://github.com/apache/inlong/pull/7068#discussion_r1057213373
##########
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);
Review Comment:
Put this check after the `List<ClusterInfo> clusterInfos` line.
--
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: commits-unsubscribe@inlong.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org