fuweng11 commented on code in PR #10836: URL: https://github.com/apache/inlong/pull/10836#discussion_r1724427417
########## inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/cluster/ClusterConfigServiceImpl.java: ########## @@ -46,28 +56,61 @@ public class ClusterConfigServiceImpl implements ClusterConfigService { @Autowired private ClusterConfigEntityMapper clusterConfigEntityMapper; @Autowired - private InlongClusterService clusterService; + private InlongClusterEntityMapper clusterEntityMapper; + @Autowired + private InlongClusterOperatorFactory clusterOperatorFactory; @Override public boolean refresh(String clusterTag, String operator) { try { ObjectMapper objectMapper = new ObjectMapper(); - List<ClusterInfo> clusterInfos = clusterService.listByTagAndType(clusterTag, ClusterType.PULSAR); - List<PulsarClusterConfig> list = new ArrayList<>(); - ClusterConfigEntity existEntity = clusterConfigEntityMapper.selectByClusterTag(clusterTag); - for (ClusterInfo clusterInfo : clusterInfos) { - PulsarClusterInfo pulsarCluster = (PulsarClusterInfo) clusterInfo; - PulsarClusterConfig pulsarClusterConfig = CommonBeanUtils.copyProperties(pulsarCluster, - PulsarClusterConfig::new); - pulsarClusterConfig.setVersion(pulsarCluster.getVersion()); - pulsarClusterConfig.setClusterName(pulsarCluster.getName()); - pulsarClusterConfig.setServiceUrl(pulsarCluster.getUrl()); - list.add(pulsarClusterConfig); + ClusterPageRequest request = ClusterPageRequest.builder() + .clusterTag(clusterTag) + .typeList(Arrays.asList(ClusterType.TUBEMQ, ClusterType.PULSAR, ClusterType.KAFKA)) + .build(); + List<InlongClusterEntity> clusterEntityList = clusterEntityMapper.selectByCondition(request); Review Comment: Fixed. -- 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-unsubscr...@inlong.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org