baomingyu commented on code in PR #9865:
URL: https://github.com/apache/inlong/pull/9865#discussion_r1535000982
##########
inlong-manager/manager-plugins/base/src/main/java/org/apache/inlong/manager/plugin/listener/StartupSortListener.java:
##########
@@ -131,30 +140,24 @@ public ListenerResult listen(WorkflowContext context)
throws Exception {
return ListenerResult.fail(message);
}
- boolean isRealTimeSync = InlongConstants.DATASYNC_REALTIME_MODE
-
.equals(groupResourceForm.getGroupInfo().getInlongGroupMode());
-
FlinkInfo flinkInfo = new FlinkInfo();
String jobName =
Constants.SORT_JOB_NAME_GENERATOR.apply(processForm) + InlongConstants.HYPHEN
+ streamInfo.getInlongStreamId();
flinkInfo.setJobName(jobName);
flinkInfo.setEndpoint(kvConf.get(InlongConstants.SORT_URL));
flinkInfo.setInlongStreamInfoList(Collections.singletonList(streamInfo));
- if (isRealTimeSync) {
-
flinkInfo.setRuntimeExecutionMode(InlongConstants.RUNTIME_EXECUTION_MODE_STREAMING);
- } else {
+ if (isOfflineSync) {
flinkInfo.setRuntimeExecutionMode(InlongConstants.RUNTIME_EXECUTION_MODE_BATCH);
+ } else {
+
flinkInfo.setRuntimeExecutionMode(InlongConstants.RUNTIME_EXECUTION_MODE_STREAMING);
}
FlinkOperation flinkOperation = FlinkOperation.getInstance();
try {
flinkOperation.genPath(flinkInfo, dataflow);
- // only start job for real-time mode
- if (isRealTimeSync) {
- flinkOperation.start(flinkInfo);
- log.info("job submit success for groupId = {}, streamId =
{}, jobId = {}", groupId,
- streamInfo.getInlongStreamId(),
flinkInfo.getJobId());
- }
+ flinkOperation.start(flinkInfo);
+ log.info("job submit success for groupId = {}, streamId = {},
jobId = {}", groupId,
+ streamInfo.getInlongStreamId(), flinkInfo.getJobId());
Review Comment:
It is recommended to add real-time/offline identification information in the
log content
--
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]