fuweng11 commented on code in PR #9933:
URL: https://github.com/apache/inlong/pull/9933#discussion_r1555240621


##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/impl/AgentServiceImpl.java:
##########
@@ -778,4 +825,53 @@ private List<StreamSourceEntity> fetchTask(TaskRequest 
request) {
         return taskLists;
     }
 
+    private ConfigResult loadModuleConfigs(ConfigRequest request) {
+        final String clusterName = request.getClusterName();
+        final String ip = request.getLocalIp();
+        LOGGER.debug("begin to load config for installer = {}", request);
+        Preconditions.expectTrue(StringUtils.isNotBlank(clusterName), "cluster 
name is blank");
+        InlongClusterEntity clusterEntity = 
clusterMapper.selectByNameAndType(clusterName, ClusterType.AGENT);
+        List<InlongClusterNodeEntity> clusterNodeEntityList =
+                clusterNodeMapper.selectByParentIdAndIp(clusterEntity.getId(), 
ip);
+        List<ModuleConfig> configs = new ArrayList<>();
+        if (CollectionUtils.isNotEmpty(clusterNodeEntityList)) {
+            AgentClusterNodeDTO dto = 
AgentClusterNodeDTO.getFromJson(clusterNodeEntityList.get(0).getExtParams());
+            List<Integer> moduleList = dto.getModuleIdList();
+            if (CollectionUtils.isNotEmpty(moduleList)) {
+                for (Integer mdId : moduleList) {
+                    ModuleConfigEntity moduleConfigEntity = 
moduleConfigEntityMapper.selectByPrimaryKey(mdId);

Review Comment:
   Done.



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