ORuteMa commented on code in PR #14237:
URL:
https://github.com/apache/dolphinscheduler/pull/14237#discussion_r1210317090
##########
dolphinscheduler-task-plugin/dolphinscheduler-task-flink/src/main/java/org/apache/dolphinscheduler/plugin/task/flink/FlinkArgsUtils.java:
##########
@@ -306,6 +299,41 @@ private static List<String>
buildRunCommandLineForOthers(TaskExecutionContext ta
args.add(ParameterUtils.convertParameterPlaceholders(mainArgs,
ParamUtils.convert(paramsMap)));
}
+ // determine yarn queue
+ determinedYarnQueue(args, flinkParameters, deployMode, flinkVersion);
return args;
}
+
+ private static void determinedYarnQueue(List<String> args, FlinkParameters
flinkParameters,
+ FlinkDeployMode deployMode, String
flinkVersion) {
+ String others = flinkParameters.getOthers();
+ switch (deployMode) {
+ case CLUSTER:
+ if (FLINK_VERSION_AFTER_OR_EQUALS_1_12.equals(flinkVersion)
+ ||
FLINK_VERSION_AFTER_OR_EQUALS_1_13.equals(flinkVersion)) {
+ if (StringUtils.isEmpty(others) ||
!others.contains(FlinkConstants.FLINK_QUEUE_FOR_TARGETS)) {
+ String queue = flinkParameters.getQueue();
+ if (StringUtils.isNotEmpty(queue)) { //
-Dyarn.application.queue=%s
+
args.add(String.format(FlinkConstants.FLINK_QUEUE_FOR_TARGETS, queue));
+ }
+ }
+ } else {
+ if (StringUtils.isEmpty(others) ||
!others.contains(FlinkConstants.FLINK_QUEUE_FOR_MODE)) {
+ String queue = flinkParameters.getQueue();
+ if (StringUtils.isNotEmpty(queue)) { // -yqu
+ args.add(FlinkConstants.FLINK_QUEUE_FOR_MODE);
+ args.add(queue);
+ }
+ }
+ }
+ case APPLICATION:
+ if (StringUtils.isEmpty(others) ||
!others.contains(FlinkConstants.FLINK_QUEUE_FOR_TARGETS)) {
+ String queue = flinkParameters.getQueue();
+ if (StringUtils.isNotEmpty(queue)) { //
-Dyarn.application.queue=%s
+
args.add(String.format(FlinkConstants.FLINK_QUEUE_FOR_TARGETS, queue));
+ }
+ }
Review Comment:
Sure
--
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]