healchow commented on code in PR #6937:
URL: https://github.com/apache/inlong/pull/6937#discussion_r1051618387
##########
inlong-manager/manager-plugins/src/main/java/org/apache/inlong/manager/plugin/flink/enums/Constants.java:
##########
@@ -69,4 +80,27 @@ public class Constants {
public static final String SEPARATOR = ":";
+ /**
+ * Generate the Job name through {@link ProcessForm}: <br/>
+ * When the ProcessForm is {@link GroupResourceProcessForm}, the format of
the job name is 'InLong-Sort-{Group ID}-{Stream ID}',
+ * otherwise take the {@link Constants#DEFAULT_SORT_JOB_NAME}:
'InLong-Sort-Job'.
+ */
+ public static Function<ProcessForm, String> SORT_JOB_NAME_GENERATOR =
(ProcessForm processForm) -> {
+ if (processForm instanceof GroupResourceProcessForm) {
+ GroupResourceProcessForm groupResourceProcessForm =
(GroupResourceProcessForm) processForm;
+ String groupId = groupResourceProcessForm.getInlongGroupId();
+ List<InlongStreamInfo> streamInfos =
groupResourceProcessForm.getStreamInfos();
+ if (streamInfos == null || streamInfos.isEmpty()) {
+ return String.format(Constants.SORT_JOB_NAME_TEMPLATE,
groupId, "NO_STREAM");
+ }
+ String streamIds =
Review Comment:
Will there be a lot of InlongStreams that cause the job name to be too long?
--
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]