aloyszhang commented on code in PR #10098:
URL: https://github.com/apache/inlong/pull/10098#discussion_r1598256133


##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/cluster/node/AgentClusterNodeInstallOperator.java:
##########
@@ -61,4 +124,22 @@ public boolean unload(InlongClusterNodeEntity 
clusterNodeEntity, String operator
         InlongClusterEntity clusterEntity = 
clusterEntityMapper.selectById(clusterNodeEntity.getParentId());
         return true;
     }
+
+    private String getInstallerDownLoadUrl(AgentClusterNodeRequest request) {
+        if (CollectionUtils.isEmpty(request.getModuleIdList())) {
+            throw new BusinessException(
+                    String.format("install failed when module id list is null 
for ip=%s, type=%s", request.getIp(),
+                            request.getType()));
+        }
+        for (Integer moduleId : request.getModuleIdList()) {
+            ModuleConfigEntity moduleConfigEntity = 
moduleConfigEntityMapper.selectByPrimaryKey(moduleId);
+            if (Objects.equals(moduleConfigEntity.getType(), 
ModuleType.INSTALLER.name())) {
+                PackageConfigEntity packageConfigEntity = 
packageConfigEntityMapper.selectByPrimaryKey(
+                        moduleConfigEntity.getPackageId());
+                return packageConfigEntity.getDownloadUrl();
+            }
+        }
+        throw new BusinessException(String.format("cant get installer download 
url for ip=%s, type=%s", request.getIp(),

Review Comment:
   ```suggestion
           throw new BusinessException(String.format("can't get installer 
download url for ip=%s, type=%s", request.getIp(),
   ```



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