Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
yanghaoyuan.sh
DolphinScheduler
提交
5657cb9a
DolphinScheduler
项目概览
yanghaoyuan.sh
/
DolphinScheduler
与 Fork 源项目一致
Fork自
apache / DolphinScheduler
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
DolphinScheduler
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
5657cb9a
编写于
4月 24, 2022
作者:
C
caishunfeng
提交者:
GitHub
4月 24, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[Bug-9719][Master] fix failover fail because task plugins has not been loaded (#9720)
上级
ebc4253d
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
14 addition
and
8 deletion
+14
-8
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/MasterServer.java
...g/apache/dolphinscheduler/server/master/MasterServer.java
+7
-0
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/FailoverExecuteThread.java
...scheduler/server/master/runner/FailoverExecuteThread.java
+3
-0
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterSchedulerService.java
...cheduler/server/master/runner/MasterSchedulerService.java
+0
-4
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/task/TaskPluginManager.java
...ache/dolphinscheduler/service/task/TaskPluginManager.java
+1
-4
dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/WorkerServer.java
...g/apache/dolphinscheduler/server/worker/WorkerServer.java
+3
-0
未找到文件。
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/MasterServer.java
浏览文件 @
5657cb9a
...
...
@@ -36,6 +36,7 @@ import org.apache.dolphinscheduler.server.master.runner.EventExecuteService;
import
org.apache.dolphinscheduler.server.master.runner.FailoverExecuteThread
;
import
org.apache.dolphinscheduler.server.master.runner.MasterSchedulerService
;
import
org.apache.dolphinscheduler.service.bean.SpringApplicationContext
;
import
org.apache.dolphinscheduler.service.task.TaskPluginManager
;
import
javax.annotation.PostConstruct
;
...
...
@@ -68,6 +69,9 @@ public class MasterServer implements IStoppable {
@Autowired
private
MasterRegistryClient
masterRegistryClient
;
@Autowired
private
TaskPluginManager
taskPluginManager
;
@Autowired
private
MasterSchedulerService
masterSchedulerService
;
...
...
@@ -131,6 +135,9 @@ public class MasterServer implements IStoppable {
this
.
nettyRemotingServer
.
start
();
// install task plugin
this
.
taskPluginManager
.
installPlugin
();
// self tolerant
this
.
masterRegistryClient
.
init
();
this
.
masterRegistryClient
.
start
();
...
...
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/FailoverExecuteThread.java
浏览文件 @
5657cb9a
...
...
@@ -50,6 +50,9 @@ public class FailoverExecuteThread extends Thread {
@Override
public
void
run
()
{
// when startup, wait 10s for ready
ThreadUtils
.
sleep
((
long
)
Constants
.
SLEEP_TIME_MILLIS
*
10
);
logger
.
info
(
"failover execute thread started"
);
while
(
Stopper
.
isRunning
())
{
try
{
...
...
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterSchedulerService.java
浏览文件 @
5657cb9a
...
...
@@ -33,7 +33,6 @@ import org.apache.dolphinscheduler.server.master.dispatch.executor.NettyExecutor
import
org.apache.dolphinscheduler.server.master.registry.ServerNodeManager
;
import
org.apache.dolphinscheduler.service.alert.ProcessAlertManager
;
import
org.apache.dolphinscheduler.service.process.ProcessService
;
import
org.apache.dolphinscheduler.service.task.TaskPluginManager
;
import
org.apache.commons.collections4.CollectionUtils
;
...
...
@@ -102,9 +101,6 @@ public class MasterSchedulerService extends Thread {
@Autowired
private
StateWheelExecuteThread
stateWheelExecuteThread
;
@Autowired
private
TaskPluginManager
taskPluginManager
;
/**
* constructor of MasterSchedulerService
*/
...
...
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/task/TaskPluginManager.java
浏览文件 @
5657cb9a
...
...
@@ -40,8 +40,6 @@ import java.util.concurrent.ConcurrentHashMap;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.boot.context.event.ApplicationReadyEvent
;
import
org.springframework.context.event.EventListener
;
import
org.springframework.stereotype.Component
;
@Component
...
...
@@ -86,8 +84,7 @@ public class TaskPluginManager {
return
taskChannel
.
parseParameters
(
parametersNode
);
}
@EventListener
public
void
installPlugin
(
ApplicationReadyEvent
readyEvent
)
{
public
void
installPlugin
()
{
final
Set
<
String
>
names
=
new
HashSet
<>();
ServiceLoader
.
load
(
TaskChannelFactory
.
class
).
forEach
(
factory
->
{
...
...
dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/WorkerServer.java
浏览文件 @
5657cb9a
...
...
@@ -155,6 +155,9 @@ public class WorkerServer implements IStoppable {
this
.
nettyRemotingServer
.
start
();
// install task plugin
this
.
taskPluginManager
.
installPlugin
();
// worker registry
try
{
this
.
workerRegistryClient
.
registry
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录