leosanqing commented on code in PR #5220:
URL: https://github.com/apache/inlong/pull/5220#discussion_r929909640
##########
inlong-manager/manager-plugins/src/main/java/org/apache/inlong/manager/plugin/listener/RestartStreamListener.java:
##########
@@ -56,6 +57,29 @@ public TaskEvent event() {
return TaskEvent.COMPLETE;
}
+ @Override
+ public boolean accept(WorkflowContext workflowContext) {
+ ProcessForm processForm = workflowContext.getProcessForm();
+ String groupId = processForm.getInlongGroupId();
+ if (!(processForm instanceof StreamResourceProcessForm)) {
+ log.info("not add restartStream listener, as the form was not
StreamResourceProcessForm for groupId [{}]",
+ groupId);
+ return false;
+ }
+
+ StreamResourceProcessForm streamProcessForm =
(StreamResourceProcessForm) processForm;
+ String streamId =
streamProcessForm.getStreamInfo().getInlongStreamId();
+ boolean flag = streamProcessForm.getGroupOperateType() ==
GroupOperateType.RESTART;
+ if (!flag) {
Review Comment:
Why not combine into one line?
--
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]