Skip to content

Commit

Permalink
[Improve] An exception occurs when the job name contains Spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
zhilinli123 committed Jan 20, 2025
1 parent 6fa886b commit 743ac6d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ public static void throwIfTrue(boolean expression, String errorMsgFmt, Object...
}
}


/**
* Validates a given condition and throws an ApiAlertException if the condition is false.
* This method is used to enforce business rules and ensure the validity of input parameters or states.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -336,9 +336,10 @@ public boolean create(FlinkApplication appParam) {
appParam.setDefaultModeIngress(settingService.getIngressModeDefault());
String jobName = appParam.getJobName();
// validate job application
validateCondition(!jobName.contains(" "), "The added job name `%s` is an invalid character and cannot contain Spaces", jobName);
validateCondition(validateQueueIfNeeded(appParam), ERROR_APP_QUEUE_HINT, appParam.getYarnQueue(), appParam.getTeamId());

validateCondition(!jobName.contains(" "),
"The added job name `%s` is an invalid character and cannot contain Spaces", jobName);
validateCondition(validateQueueIfNeeded(appParam), ERROR_APP_QUEUE_HINT, appParam.getYarnQueue(),
appParam.getTeamId());

appParam.doSetHotParams();
if (appParam.isUploadJob()) {
Expand Down

0 comments on commit 743ac6d

Please sign in to comment.