vernedeng commented on code in PR #10637:
URL: https://github.com/apache/inlong/pull/10637#discussion_r1679050149
##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/cluster/node/AgentClusterNodeOperator.java:
##########
@@ -88,4 +164,94 @@ protected void setTargetEntity(ClusterNodeRequest request,
InlongClusterNodeEnti
String.format("serialize extParams of Agent ClusterNode
failure: %s", e.getMessage()));
}
}
+
+ public void updateModuleConfig(String ip, String clusterName) {
+ try {
+ ConfigRequest configRequest = new ConfigRequest();
+ LOGGER.info("begin to update module config for cluster name={},
ip={}", clusterName, ip);
+ if (StringUtils.isBlank(clusterName) || StringUtils.isBlank(ip)) {
+ LOGGER.info("no need to update module config when ip or
cluster name is null");
+ return;
+ }
+ configRequest.setLocalIp(ip);
+ configRequest.setClusterName(clusterName);
+ ConfigResult configResult = loadModuleConfigs(configRequest);
+ AgentTaskConfigEntity existEntity =
agentTaskConfigEntityMapper.selectByIdentifier(ip, clusterName);
+ AgentTaskConfigEntity agentTaskConfigEntity = new
AgentTaskConfigEntity();
Review Comment:
```suggestion
AgentTaskConfigEntity agentTaskConfigEntity = existEntity ==
null ? new AgentTaskConfigEntity() :
CommonBeanUtils.copyProperties(existEntity, AgentTaskConfigEntity::new, true);
```
--
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]