haibo-duan commented on code in PR #5220:
URL: https://github.com/apache/inlong/pull/5220#discussion_r930569071
##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/mq/CreatePulsarTopicTaskListener.java:
##########
@@ -57,6 +60,38 @@ public TaskEvent event() {
return TaskEvent.COMPLETE;
}
+ @Override
+ public boolean accept(WorkflowContext context) {
+ ProcessForm processForm = context.getProcessForm();
+ if (!(processForm instanceof StreamResourceProcessForm)) {
+ return false;
+ }
+ StreamResourceProcessForm streamResourceProcessForm =
(StreamResourceProcessForm) processForm;
+ GroupOperateType operateType =
streamResourceProcessForm.getGroupOperateType();
+ if (operateType != GroupOperateType.INIT) {
+ return false;
+ }
+
+ InlongGroupInfo groupInfo = streamResourceProcessForm.getGroupInfo();
+ MQType mqType = MQType.forType(groupInfo.getMqType());
+ String groupId = groupInfo.getInlongGroupId();
+ String streamId =
streamResourceProcessForm.getStreamInfo().getInlongStreamId();
+ if (mqType == MQType.PULSAR || mqType == MQType.TDMQ_PULSAR) {
+ InlongPulsarInfo pulsarInfo = (InlongPulsarInfo) groupInfo;
+ boolean enable =
InlongConstants.ENABLE_CREATE_RESOURCE.equals(pulsarInfo.getEnableCreateResource());
+ if (enable) {
Review Comment:
There is no need to define the variable enable here.
--
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]