healchow commented on code in PR #5153:
URL: https://github.com/apache/inlong/pull/5153#discussion_r926305480
##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/workflow/group/listener/UpdateGroupCompleteListener.java:
##########
@@ -49,35 +51,55 @@ public ProcessEvent event() {
}
@Override
- public ListenerResult listen(WorkflowContext context) throws Exception {
+ public ListenerResult listen(WorkflowContext context) {
GroupResourceProcessForm form = (GroupResourceProcessForm)
context.getProcessForm();
String groupId = form.getInlongGroupId();
GroupOperateType operateType = form.getGroupOperateType();
log.info("begin to execute UpdateGroupCompleteListener for groupId={},
operateType={}", groupId, operateType);
+ // update inlong group status and other configs
String operator = context.getOperator();
switch (operateType) {
case SUSPEND:
groupService.updateStatus(groupId,
GroupStatus.SUSPENDED.getCode(), operator);
- sourceService.updateStatus(groupId, null,
SourceStatus.SOURCE_FROZEN.getCode(), operator);
break;
case RESTART:
groupService.updateStatus(groupId,
GroupStatus.RESTARTED.getCode(), operator);
- sourceService.updateStatus(groupId, null,
SourceStatus.SOURCE_NORMAL.getCode(), operator);
break;
case DELETE:
groupService.updateStatus(groupId,
GroupStatus.DELETED.getCode(), operator);
- sourceService.logicDeleteAll(groupId, null, operator);
break;
default:
+ log.warn("Unsupported operate={} for inlong group",
operateType);
break;
}
+ InlongGroupInfo groupInfo = form.getGroupInfo();
+ groupService.update(groupInfo.genRequest(), operator);
- // update inlong group status and other configs
- groupService.update(form.getGroupInfo().genRequest(), operator);
+ // if the inlong group is lightweight mode, the stream source needs to
be processed.
+ if
(InlongConstants.LIGHTWEIGHT_MODE.equals(groupInfo.getLightweight())) {
+ changeSource4Lightweight(groupId, operateType, operator);
+ }
Review Comment:
The extract nodes for Sort were saved as stream sources. So, needs to
operate especially in lightweight mode.
--
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]