Skip to content

Commit 49a9684

Browse files
authored
Merge pull request #999 from WeDataSphere/master
Fix the bug that DolphinScheduler do not support empty node.
2 parents 3e30600 + 5eadbba commit 49a9684

File tree

1 file changed

+10
-2
lines changed
  • plugins/dolphinscheduler/dss-dolphinscheduler-client/src/main/scala/com/webank/wedatasphere/dss/plugins/dolphinscheduler/linkis/client

1 file changed

+10
-2
lines changed

plugins/dolphinscheduler/dss-dolphinscheduler-client/src/main/scala/com/webank/wedatasphere/dss/plugins/dolphinscheduler/linkis/client/DSSDolphinSchedulerClient.scala

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import java.util
44

55
import com.webank.wedatasphere.dss.linkis.node.execution.conf.LinkisJobExecutionConfiguration
66
import com.webank.wedatasphere.dss.linkis.node.execution.execution.impl.LinkisNodeExecutionImpl
7-
import com.webank.wedatasphere.dss.linkis.node.execution.job.Job
7+
import com.webank.wedatasphere.dss.linkis.node.execution.job.{JobTypeEnum, LinkisJob}
88
import com.webank.wedatasphere.dss.linkis.node.execution.listener.LinkisExecutionListener
99
import com.webank.wedatasphere.dss.linkis.node.execution.log.LinkisJobExecutionLog
1010
import com.webank.wedatasphere.dss.plugins.dolphinscheduler.linkis.client.conf.LinkisJobTypeConf
@@ -68,8 +68,16 @@ object DSSDolphinSchedulerClient extends Logging {
6868
getAndSet("FLOW_RESOURCES", LinkisJobTypeConf.FLOW_RESOURCES)
6969
getAndSet("FLOW_PROPERTIES", LinkisJobTypeConf.FLOW_PROPERTIES)
7070
getAndSet("JOB_LABELS", LinkisJobTypeConf.JOB_LABELS)
71-
val job: Job = new DolphinSchedulerJobBuilder(jobProps).build()
71+
val job = new DolphinSchedulerJobBuilder(jobProps).build() match {
72+
case linkisJob: LinkisJob => linkisJob
73+
}
7274
job.setLogObj(logObj)
75+
job.getJobType match {
76+
case JobTypeEnum.EmptyJob =>
77+
logObj.warn("This node is empty node, just do nothing and return.")
78+
return
79+
case _ =>
80+
}
7381

7482
val execution = LinkisNodeExecutionImpl.getLinkisNodeExecution
7583
execution.runJob(job)

0 commit comments

Comments
 (0)