Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
DolphinScheduler
提交
3701a24d
DolphinScheduler
项目概览
apache
/
DolphinScheduler
上一次同步 1 年多
通知
705
Star
9572
Fork
3514
代码
文件
提交
分支
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,体验更适合开发者的 AI 搜索 >>
未验证
提交
3701a24d
编写于
7月 22, 2022
作者:
Z
zhuxt2015
提交者:
GitHub
7月 22, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[Improvement][Task Log] Task status log print description instead of code (#11009)
* use execution status instead of status code
上级
de6e58ec
变更
21
隐藏空白更改
内联
并排
Showing
21 changed file
with
46 addition
and
38 deletion
+46
-38
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/event/TaskDelayEventHandler.java
...nscheduler/server/master/event/TaskDelayEventHandler.java
+1
-1
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/event/TaskRejectByWorkerEventHandler.java
...r/server/master/event/TaskRejectByWorkerEventHandler.java
+1
-1
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/event/TaskResultEventHandler.java
...scheduler/server/master/event/TaskResultEventHandler.java
+1
-1
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/event/TaskRunningEventHandler.java
...cheduler/server/master/event/TaskRunningEventHandler.java
+1
-1
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/processor/queue/StateEventResponseService.java
...ver/master/processor/queue/StateEventResponseService.java
+1
-1
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/processor/queue/TaskEvent.java
...hinscheduler/server/master/processor/queue/TaskEvent.java
+1
-1
dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/processor/TaskAckProcessorTest.java
...heduler/server/master/processor/TaskAckProcessorTest.java
+2
-1
dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/processor/TaskKillResponseProcessorTest.java
...erver/master/processor/TaskKillResponseProcessorTest.java
+2
-1
dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/processor/queue/TaskResponseServiceTest.java
...erver/master/processor/queue/TaskResponseServiceTest.java
+1
-1
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/command/StateEventResponseCommand.java
...inscheduler/remote/command/StateEventResponseCommand.java
+5
-4
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/command/TaskExecuteAckCommand.java
...olphinscheduler/remote/command/TaskExecuteAckCommand.java
+3
-2
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/command/TaskExecuteRunningAckMessage.java
...cheduler/remote/command/TaskExecuteRunningAckMessage.java
+5
-4
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/command/TaskExecuteRunningCommand.java
...inscheduler/remote/command/TaskExecuteRunningCommand.java
+2
-1
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/command/TaskKillResponseCommand.java
...phinscheduler/remote/command/TaskKillResponseCommand.java
+5
-4
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/command/TaskRejectAckCommand.java
...dolphinscheduler/remote/command/TaskRejectAckCommand.java
+3
-2
dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/message/TaskExecuteRunningMessageSender.java
...erver/worker/message/TaskExecuteRunningMessageSender.java
+1
-1
dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/processor/TaskExecuteResultAckProcessor.java
...erver/worker/processor/TaskExecuteResultAckProcessor.java
+4
-4
dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/processor/TaskExecuteRunningAckProcessor.java
...rver/worker/processor/TaskExecuteRunningAckProcessor.java
+1
-1
dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/processor/TaskKillProcessor.java
...nscheduler/server/worker/processor/TaskKillProcessor.java
+1
-1
dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/processor/TaskRejectAckProcessor.java
...duler/server/worker/processor/TaskRejectAckProcessor.java
+1
-1
dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/runner/TaskExecuteThread.java
...phinscheduler/server/worker/runner/TaskExecuteThread.java
+4
-4
未找到文件。
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/event/TaskDelayEventHandler.java
浏览文件 @
3701a24d
...
...
@@ -109,7 +109,7 @@ public class TaskDelayEventHandler implements TaskEventHandler {
private
void
sendAckToWorker
(
TaskEvent
taskEvent
)
{
// If event handle success, send ack to worker to otherwise the worker will retry this event
TaskExecuteRunningAckMessage
taskExecuteRunningAckMessage
=
new
TaskExecuteRunningAckMessage
(
ExecutionStatus
.
SUCCESS
.
getCode
()
,
taskEvent
.
getTaskInstanceId
());
new
TaskExecuteRunningAckMessage
(
ExecutionStatus
.
SUCCESS
,
taskEvent
.
getTaskInstanceId
());
taskEvent
.
getChannel
().
writeAndFlush
(
taskExecuteRunningAckMessage
.
convert2Command
());
}
...
...
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/event/TaskRejectByWorkerEventHandler.java
浏览文件 @
3701a24d
...
...
@@ -69,7 +69,7 @@ public class TaskRejectByWorkerEventHandler implements TaskEventHandler {
}
public
void
sendAckToWorker
(
TaskEvent
taskEvent
)
{
TaskRejectAckCommand
taskRejectAckMessage
=
new
TaskRejectAckCommand
(
ExecutionStatus
.
SUCCESS
.
getCode
()
,
TaskRejectAckCommand
taskRejectAckMessage
=
new
TaskRejectAckCommand
(
ExecutionStatus
.
SUCCESS
,
taskEvent
.
getTaskInstanceId
(),
masterConfig
.
getMasterAddress
(),
taskEvent
.
getWorkerAddress
(),
...
...
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/event/TaskResultEventHandler.java
浏览文件 @
3701a24d
...
...
@@ -110,7 +110,7 @@ public class TaskResultEventHandler implements TaskEventHandler {
public
void
sendAckToWorker
(
TaskEvent
taskEvent
)
{
// we didn't set the receiver address, since the ack doen's need to retry
TaskExecuteAckCommand
taskExecuteAckMessage
=
new
TaskExecuteAckCommand
(
ExecutionStatus
.
SUCCESS
.
getCode
()
,
TaskExecuteAckCommand
taskExecuteAckMessage
=
new
TaskExecuteAckCommand
(
ExecutionStatus
.
SUCCESS
,
taskEvent
.
getTaskInstanceId
(),
masterConfig
.
getMasterAddress
(),
taskEvent
.
getWorkerAddress
(),
...
...
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/event/TaskRunningEventHandler.java
浏览文件 @
3701a24d
...
...
@@ -107,7 +107,7 @@ public class TaskRunningEventHandler implements TaskEventHandler {
private
void
sendAckToWorker
(
TaskEvent
taskEvent
)
{
// If event handle success, send ack to worker to otherwise the worker will retry this event
TaskExecuteRunningAckMessage
taskExecuteRunningAckMessage
=
new
TaskExecuteRunningAckMessage
(
ExecutionStatus
.
SUCCESS
.
getCode
()
,
taskEvent
.
getTaskInstanceId
());
new
TaskExecuteRunningAckMessage
(
ExecutionStatus
.
SUCCESS
,
taskEvent
.
getTaskInstanceId
());
taskEvent
.
getChannel
().
writeAndFlush
(
taskExecuteRunningAckMessage
.
convert2Command
());
}
...
...
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/processor/queue/StateEventResponseService.java
浏览文件 @
3701a24d
...
...
@@ -136,7 +136,7 @@ public class StateEventResponseService {
private
void
writeResponse
(
StateEvent
stateEvent
,
ExecutionStatus
status
)
{
Channel
channel
=
stateEvent
.
getChannel
();
if
(
channel
!=
null
)
{
StateEventResponseCommand
command
=
new
StateEventResponseCommand
(
status
.
getCode
()
,
stateEvent
.
getKey
());
StateEventResponseCommand
command
=
new
StateEventResponseCommand
(
status
,
stateEvent
.
getKey
());
channel
.
writeAndFlush
(
command
.
convert2Command
());
}
}
...
...
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/processor/queue/TaskEvent.java
浏览文件 @
3701a24d
...
...
@@ -109,7 +109,7 @@ public class TaskEvent {
TaskEvent
event
=
new
TaskEvent
();
event
.
setProcessInstanceId
(
command
.
getProcessInstanceId
());
event
.
setTaskInstanceId
(
command
.
getTaskInstanceId
());
event
.
setState
(
ExecutionStatus
.
of
(
command
.
getStatus
()
));
event
.
setState
(
command
.
getStatus
(
));
event
.
setStartTime
(
command
.
getStartTime
());
event
.
setExecutePath
(
command
.
getExecutePath
());
event
.
setLogPath
(
command
.
getLogPath
());
...
...
dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/processor/TaskAckProcessorTest.java
浏览文件 @
3701a24d
...
...
@@ -17,6 +17,7 @@
package
org.apache.dolphinscheduler.server.master.processor
;
import
org.apache.dolphinscheduler.plugin.task.api.enums.ExecutionStatus
;
import
org.apache.dolphinscheduler.remote.command.TaskExecuteRunningCommand
;
import
org.apache.dolphinscheduler.server.master.processor.queue.TaskEvent
;
import
org.apache.dolphinscheduler.server.master.processor.queue.TaskEventService
;
...
...
@@ -66,7 +67,7 @@ public class TaskAckProcessorTest {
taskExecuteRunningMessage
=
new
TaskExecuteRunningCommand
(
"127.0.0.1:5678"
,
" 127.0.0.1:1234"
,
System
.
currentTimeMillis
());
taskExecuteRunningMessage
.
setStatus
(
1
);
taskExecuteRunningMessage
.
setStatus
(
ExecutionStatus
.
RUNNING_EXECUTION
);
taskExecuteRunningMessage
.
setExecutePath
(
"/dolphinscheduler/worker"
);
taskExecuteRunningMessage
.
setHost
(
"localhost"
);
taskExecuteRunningMessage
.
setLogPath
(
"/temp/worker.log"
);
...
...
dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/processor/TaskKillResponseProcessorTest.java
浏览文件 @
3701a24d
...
...
@@ -17,6 +17,7 @@
package
org.apache.dolphinscheduler.server.master.processor
;
import
org.apache.dolphinscheduler.plugin.task.api.enums.ExecutionStatus
;
import
org.apache.dolphinscheduler.remote.command.Command
;
import
org.apache.dolphinscheduler.remote.command.CommandType
;
import
org.apache.dolphinscheduler.remote.command.TaskKillResponseCommand
;
...
...
@@ -50,7 +51,7 @@ public class TaskKillResponseProcessorTest {
new
ArrayList
<
String
>()
{{
add
(
"task_1"
);
}});
taskKillResponseCommand
.
setHost
(
"localhost"
);
taskKillResponseCommand
.
setProcessId
(
1
);
taskKillResponseCommand
.
setStatus
(
1
);
taskKillResponseCommand
.
setStatus
(
ExecutionStatus
.
RUNNING_EXECUTION
);
taskKillResponseCommand
.
setTaskInstanceId
(
1
);
}
...
...
dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/processor/queue/TaskResponseServiceTest.java
浏览文件 @
3701a24d
...
...
@@ -78,7 +78,7 @@ public class TaskResponseServiceTest {
System
.
currentTimeMillis
());
taskExecuteRunningMessage
.
setProcessId
(
1
);
taskExecuteRunningMessage
.
setTaskInstanceId
(
22
);
taskExecuteRunningMessage
.
setStatus
(
ExecutionStatus
.
RUNNING_EXECUTION
.
getCode
()
);
taskExecuteRunningMessage
.
setStatus
(
ExecutionStatus
.
RUNNING_EXECUTION
);
taskExecuteRunningMessage
.
setExecutePath
(
"path"
);
taskExecuteRunningMessage
.
setLogPath
(
"logPath"
);
taskExecuteRunningMessage
.
setHost
(
"127.*.*.*"
);
...
...
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/command/StateEventResponseCommand.java
浏览文件 @
3701a24d
...
...
@@ -18,6 +18,7 @@
package
org.apache.dolphinscheduler.remote.command
;
import
org.apache.dolphinscheduler.common.utils.JSONUtils
;
import
org.apache.dolphinscheduler.plugin.task.api.enums.ExecutionStatus
;
import
java.io.Serializable
;
...
...
@@ -27,22 +28,22 @@ import java.io.Serializable;
public
class
StateEventResponseCommand
implements
Serializable
{
private
String
key
;
private
int
status
;
private
ExecutionStatus
status
;
public
StateEventResponseCommand
()
{
super
();
}
public
StateEventResponseCommand
(
int
status
,
String
key
)
{
public
StateEventResponseCommand
(
ExecutionStatus
status
,
String
key
)
{
this
.
status
=
status
;
this
.
key
=
key
;
}
public
int
getStatus
()
{
public
ExecutionStatus
getStatus
()
{
return
status
;
}
public
void
setStatus
(
int
status
)
{
public
void
setStatus
(
ExecutionStatus
status
)
{
this
.
status
=
status
;
}
...
...
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/command/TaskExecuteAckCommand.java
浏览文件 @
3701a24d
...
...
@@ -18,6 +18,7 @@
package
org.apache.dolphinscheduler.remote.command
;
import
org.apache.dolphinscheduler.common.utils.JSONUtils
;
import
org.apache.dolphinscheduler.plugin.task.api.enums.ExecutionStatus
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
...
...
@@ -35,9 +36,9 @@ import lombok.ToString;
public
class
TaskExecuteAckCommand
extends
BaseCommand
{
private
int
taskInstanceId
;
private
int
status
;
private
ExecutionStatus
status
;
public
TaskExecuteAckCommand
(
int
status
,
public
TaskExecuteAckCommand
(
ExecutionStatus
status
,
int
taskInstanceId
,
String
sourceServerAddress
,
String
messageReceiverAddress
,
...
...
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/command/TaskExecuteRunningAckMessage.java
浏览文件 @
3701a24d
...
...
@@ -18,6 +18,7 @@
package
org.apache.dolphinscheduler.remote.command
;
import
org.apache.dolphinscheduler.common.utils.JSONUtils
;
import
org.apache.dolphinscheduler.plugin.task.api.enums.ExecutionStatus
;
import
java.io.Serializable
;
...
...
@@ -28,13 +29,13 @@ import java.io.Serializable;
public
class
TaskExecuteRunningAckMessage
implements
Serializable
{
private
int
taskInstanceId
;
private
int
status
;
private
ExecutionStatus
status
;
public
TaskExecuteRunningAckMessage
()
{
super
();
}
public
TaskExecuteRunningAckMessage
(
int
status
,
int
taskInstanceId
)
{
public
TaskExecuteRunningAckMessage
(
ExecutionStatus
status
,
int
taskInstanceId
)
{
this
.
status
=
status
;
this
.
taskInstanceId
=
taskInstanceId
;
}
...
...
@@ -47,11 +48,11 @@ public class TaskExecuteRunningAckMessage implements Serializable {
this
.
taskInstanceId
=
taskInstanceId
;
}
public
int
getStatus
()
{
public
ExecutionStatus
getStatus
()
{
return
status
;
}
public
void
setStatus
(
int
status
)
{
public
void
setStatus
(
ExecutionStatus
status
)
{
this
.
status
=
status
;
}
...
...
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/command/TaskExecuteRunningCommand.java
浏览文件 @
3701a24d
...
...
@@ -18,6 +18,7 @@
package
org.apache.dolphinscheduler.remote.command
;
import
org.apache.dolphinscheduler.common.utils.JSONUtils
;
import
org.apache.dolphinscheduler.plugin.task.api.enums.ExecutionStatus
;
import
java.util.Date
;
...
...
@@ -58,7 +59,7 @@ public class TaskExecuteRunningCommand extends BaseCommand {
/**
* status
*/
private
int
status
;
private
ExecutionStatus
status
;
/**
* logPath
...
...
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/command/TaskKillResponseCommand.java
浏览文件 @
3701a24d
...
...
@@ -18,6 +18,7 @@
package
org.apache.dolphinscheduler.remote.command
;
import
org.apache.dolphinscheduler.common.utils.JSONUtils
;
import
org.apache.dolphinscheduler.plugin.task.api.enums.ExecutionStatus
;
import
java.io.Serializable
;
import
java.util.List
;
...
...
@@ -40,7 +41,7 @@ public class TaskKillResponseCommand implements Serializable {
/**
* status
*/
private
int
status
;
private
ExecutionStatus
status
;
/**
...
...
@@ -69,11 +70,11 @@ public class TaskKillResponseCommand implements Serializable {
this
.
host
=
host
;
}
public
int
getStatus
()
{
public
ExecutionStatus
getStatus
()
{
return
status
;
}
public
void
setStatus
(
int
status
)
{
public
void
setStatus
(
ExecutionStatus
status
)
{
this
.
status
=
status
;
}
...
...
@@ -111,7 +112,7 @@ public class TaskKillResponseCommand implements Serializable {
return
"TaskKillResponseCommand{"
+
"taskInstanceId="
+
taskInstanceId
+
", host='"
+
host
+
'\''
+
", status="
+
status
+
", status="
+
status
.
getDescp
()
+
", processId="
+
processId
+
", appIds="
+
appIds
+
'}'
;
...
...
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/command/TaskRejectAckCommand.java
浏览文件 @
3701a24d
...
...
@@ -18,6 +18,7 @@
package
org.apache.dolphinscheduler.remote.command
;
import
org.apache.dolphinscheduler.common.utils.JSONUtils
;
import
org.apache.dolphinscheduler.plugin.task.api.enums.ExecutionStatus
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
...
...
@@ -31,9 +32,9 @@ import lombok.ToString;
public
class
TaskRejectAckCommand
extends
BaseCommand
{
private
int
taskInstanceId
;
private
int
status
;
private
ExecutionStatus
status
;
public
TaskRejectAckCommand
(
int
status
,
public
TaskRejectAckCommand
(
ExecutionStatus
status
,
int
taskInstanceId
,
String
messageSenderAddress
,
String
messageReceiverAddress
,
...
...
dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/message/TaskExecuteRunningMessageSender.java
浏览文件 @
3701a24d
...
...
@@ -52,7 +52,7 @@ public class TaskExecuteRunningMessageSender implements MessageSender<TaskExecut
System
.
currentTimeMillis
());
taskExecuteRunningMessage
.
setTaskInstanceId
(
taskExecutionContext
.
getTaskInstanceId
());
taskExecuteRunningMessage
.
setProcessInstanceId
(
taskExecutionContext
.
getProcessInstanceId
());
taskExecuteRunningMessage
.
setStatus
(
taskExecutionContext
.
getCurrentExecutionStatus
()
.
getCode
()
);
taskExecuteRunningMessage
.
setStatus
(
taskExecutionContext
.
getCurrentExecutionStatus
());
taskExecuteRunningMessage
.
setLogPath
(
taskExecutionContext
.
getLogPath
());
taskExecuteRunningMessage
.
setHost
(
taskExecutionContext
.
getHost
());
taskExecuteRunningMessage
.
setStartTime
(
taskExecutionContext
.
getStartTime
());
...
...
dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/processor/TaskExecuteResultAckProcessor.java
浏览文件 @
3701a24d
...
...
@@ -62,17 +62,17 @@ public class TaskExecuteResultAckProcessor implements NettyRequestProcessor {
try
{
LoggerUtils
.
setTaskInstanceIdMDC
(
taskExecuteAckMessage
.
getTaskInstanceId
());
if
(
taskExecuteAckMessage
.
getStatus
()
==
ExecutionStatus
.
SUCCESS
.
getCode
()
)
{
if
(
taskExecuteAckMessage
.
getStatus
()
==
ExecutionStatus
.
SUCCESS
)
{
messageRetryRunner
.
removeRetryMessage
(
taskExecuteAckMessage
.
getTaskInstanceId
(),
CommandType
.
TASK_EXECUTE_RESULT
);
logger
.
debug
(
"remove REMOTE_CHANNELS, task instance id:{}"
,
taskExecuteAckMessage
.
getTaskInstanceId
());
}
else
if
(
taskExecuteAckMessage
.
getStatus
()
==
ExecutionStatus
.
FAILURE
.
getCode
()
)
{
}
else
if
(
taskExecuteAckMessage
.
getStatus
()
==
ExecutionStatus
.
FAILURE
)
{
// master handle worker response error, will still retry
logger
.
error
(
"Receive task execute result ack message, the message status is not success, message: {}"
,
taskExecuteAckMessage
);
taskExecuteAckMessage
);
}
else
{
throw
new
IllegalArgumentException
(
"Invalid task execute response ack status: "
+
taskExecuteAckMessage
.
getStatus
());
+
taskExecuteAckMessage
.
getStatus
());
}
}
finally
{
LoggerUtils
.
removeTaskInstanceIdMDC
();
...
...
dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/processor/TaskExecuteRunningAckProcessor.java
浏览文件 @
3701a24d
...
...
@@ -61,7 +61,7 @@ public class TaskExecuteRunningAckProcessor implements NettyRequestProcessor {
LoggerUtils
.
setTaskInstanceIdMDC
(
runningAckCommand
.
getTaskInstanceId
());
logger
.
info
(
"task execute running ack command : {}"
,
runningAckCommand
);
if
(
runningAckCommand
.
getStatus
()
==
ExecutionStatus
.
SUCCESS
.
getCode
()
)
{
if
(
runningAckCommand
.
getStatus
()
==
ExecutionStatus
.
SUCCESS
)
{
messageRetryRunner
.
removeRetryMessage
(
runningAckCommand
.
getTaskInstanceId
(),
CommandType
.
TASK_EXECUTE_RUNNING
);
}
...
...
dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/processor/TaskKillProcessor.java
浏览文件 @
3701a24d
...
...
@@ -122,7 +122,7 @@ public class TaskKillProcessor implements NettyRequestProcessor {
private
void
sendTaskKillResponseCommand
(
Channel
channel
,
TaskExecutionContext
taskExecutionContext
)
{
TaskKillResponseCommand
taskKillResponseCommand
=
new
TaskKillResponseCommand
();
taskKillResponseCommand
.
setStatus
(
taskExecutionContext
.
getCurrentExecutionStatus
()
.
getCode
()
);
taskKillResponseCommand
.
setStatus
(
taskExecutionContext
.
getCurrentExecutionStatus
());
taskKillResponseCommand
.
setAppIds
(
Arrays
.
asList
(
taskExecutionContext
.
getAppIds
().
split
(
TaskConstants
.
COMMA
)));
taskKillResponseCommand
.
setTaskInstanceId
(
taskExecutionContext
.
getTaskInstanceId
());
taskKillResponseCommand
.
setHost
(
taskExecutionContext
.
getHost
());
...
...
dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/processor/TaskRejectAckProcessor.java
浏览文件 @
3701a24d
...
...
@@ -55,7 +55,7 @@ public class TaskRejectAckProcessor implements NettyRequestProcessor {
}
try
{
LoggerUtils
.
setTaskInstanceIdMDC
(
taskRejectAckMessage
.
getTaskInstanceId
());
if
(
taskRejectAckMessage
.
getStatus
()
==
ExecutionStatus
.
SUCCESS
.
getCode
()
)
{
if
(
taskRejectAckMessage
.
getStatus
()
==
ExecutionStatus
.
SUCCESS
)
{
messageRetryRunner
.
removeRetryMessage
(
taskRejectAckMessage
.
getTaskInstanceId
(),
CommandType
.
TASK_REJECT
);
logger
.
debug
(
"removeRecallCache: task instance id:{}"
,
taskRejectAckMessage
.
getTaskInstanceId
());
...
...
dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/runner/TaskExecuteThread.java
浏览文件 @
3701a24d
...
...
@@ -207,10 +207,10 @@ public class TaskExecuteThread implements Runnable, Delayed {
// task result process
if
(
this
.
task
.
getNeedAlert
())
{
sendAlert
(
this
.
task
.
getTaskAlertInfo
(),
this
.
task
.
getExitStatus
()
.
getCode
()
);
sendAlert
(
this
.
task
.
getTaskAlertInfo
(),
this
.
task
.
getExitStatus
());
}
taskExecutionContext
.
setCurrentExecutionStatus
(
ExecutionStatus
.
of
(
this
.
task
.
getExitStatus
().
getCode
()
));
taskExecutionContext
.
setCurrentExecutionStatus
(
this
.
task
.
getExitStatus
(
));
taskExecutionContext
.
setEndTime
(
DateUtils
.
getCurrentDate
());
taskExecutionContext
.
setProcessId
(
this
.
task
.
getProcessId
());
taskExecutionContext
.
setAppIds
(
this
.
task
.
getAppIds
());
...
...
@@ -233,8 +233,8 @@ public class TaskExecuteThread implements Runnable, Delayed {
}
}
private
void
sendAlert
(
TaskAlertInfo
taskAlertInfo
,
int
status
)
{
int
strategy
=
status
==
ExecutionStatus
.
SUCCESS
.
getCode
()
?
WarningType
.
SUCCESS
.
getCode
()
:
WarningType
.
FAILURE
.
getCode
();
private
void
sendAlert
(
TaskAlertInfo
taskAlertInfo
,
ExecutionStatus
status
)
{
int
strategy
=
status
==
ExecutionStatus
.
SUCCESS
?
WarningType
.
SUCCESS
.
getCode
()
:
WarningType
.
FAILURE
.
getCode
();
alertClientService
.
sendAlert
(
taskAlertInfo
.
getAlertGroupId
(),
taskAlertInfo
.
getTitle
(),
taskAlertInfo
.
getContent
(),
strategy
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录