healchow commented on code in PR #6411:
URL: https://github.com/apache/inlong/pull/6411#discussion_r1014638247
##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/group/InlongGroupOperator4TubeMQ.java:
##########
@@ -61,15 +63,25 @@ public InlongTubeMQInfo getFromEntity(InlongGroupEntity
entity) {
InlongTubeMQInfo groupInfo = new InlongTubeMQInfo();
CommonBeanUtils.copyProperties(entity, groupInfo);
-
+ if (StringUtils.isNotBlank(entity.getExtParams())) {
+ InlongTubeMQDTO dto =
InlongTubeMQDTO.getFromJson(entity.getExtParams());
+ CommonBeanUtils.copyProperties(dto, groupInfo);
+ }
// TODO get the cluster
// groupInfo.setTubeMaster();
return groupInfo;
}
@Override
protected void setTargetEntity(InlongGroupRequest request,
InlongGroupEntity targetEntity) {
- LOGGER.info("do nothing for inlong group with TubeMQ");
+ InlongTubeMQRequest tubeMQRequest = (InlongTubeMQRequest) request;
+ try {
+ InlongTubeMQDTO dto =
InlongTubeMQDTO.getFromRequest(tubeMQRequest);
+ targetEntity.setExtParams(objectMapper.writeValueAsString(dto));
+ } catch (Exception e) {
+ throw new
BusinessException(ErrorCodeEnum.SOURCE_INFO_INCORRECT.getMessage() + ": " +
e.getMessage());
+ }
+ LOGGER.info("success set entity for inlong group with TubeMQ");
Review Comment:
Not necessary to add this info log, just remove it.
--
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]