You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by we...@apache.org on 2022/11/04 15:02:13 UTC

[dolphinscheduler] branch dev updated: Fix flink sql cannot run due to missing main jar (#12705)

This is an automated email from the ASF dual-hosted git repository.

wenjun pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


The following commit(s) were added to refs/heads/dev by this push:
     new 2c3cc31a4c Fix flink sql cannot run due to missing main jar (#12705)
2c3cc31a4c is described below

commit 2c3cc31a4ce43b3b03b42530d41e21785796ab30
Author: Wenjun Ruan <we...@apache.org>
AuthorDate: Fri Nov 4 23:02:00 2022 +0800

    Fix flink sql cannot run due to missing main jar (#12705)
---
 .../org/apache/dolphinscheduler/plugin/task/flink/FlinkTask.java    | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/dolphinscheduler-task-plugin/dolphinscheduler-task-flink/src/main/java/org/apache/dolphinscheduler/plugin/task/flink/FlinkTask.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-flink/src/main/java/org/apache/dolphinscheduler/plugin/task/flink/FlinkTask.java
index 99a230aef1..df454a4f33 100644
--- a/dolphinscheduler-task-plugin/dolphinscheduler-task-flink/src/main/java/org/apache/dolphinscheduler/plugin/task/flink/FlinkTask.java
+++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-flink/src/main/java/org/apache/dolphinscheduler/plugin/task/flink/FlinkTask.java
@@ -85,10 +85,16 @@ public class FlinkTask extends AbstractYarnTask {
 
     @Override
     protected void setMainJarName() {
+        if (flinkParameters.getProgramType() == ProgramType.SQL) {
+            logger.info("The current flink job type is SQL, will no need to set main jar");
+            return;
+        }
+
         ResourceInfo mainJar = flinkParameters.getMainJar();
         String resourceName = getResourceNameOfMainJar(mainJar);
         mainJar.setRes(resourceName);
         flinkParameters.setMainJar(mainJar);
+        logger.info("Success set flink jar: {}", resourceName);
     }
 
     @Override