DolphinScheduler - 1.3 系列核心表结构剖析
Apache DolphinScheduler 是一个分布式去中心化,易扩展的可视化 DAG 工作流任务调度系统。致力于解决数据处理流程中错综复杂的依赖关系,使调度系统在数据处理流程中开箱即用。
近日,伯毅同学给社区贡献了工作流核心表结构的剖析文章,非常细致,喜欢的伙伴请转走
1. 工作流总体存储结构
在 dolphinscheduler 库中创建的所有工作流定义(模板)都保存在 t_ds_process_definition 表中.
该数据库表结构如下表所示:
序号 |
字段 |
类型 |
描述 |
1 |
id |
int(11) |
主键 |
2 |
name |
varchar(255) |
流程定义名称 |
3 |
version |
int(11) |
流程定义版本 |
4 |
release_state |
tinyint(4) |
流程定义的发布状态:0 未上线 , 1已上线 |
5 |
project_id |
int(11) |
项目id |
6 |
user_id |
int(11) |
流程定义所属用户id |
7 |
process_definition_json |
longtext |
流程定义JSON |
8 |
description |
text |
流程定义描述 |
9 |
global_params |
text |
全局参数 |
10 |
flag |
tinyint(4) |
流程是否可用:0 不可用,1 可用 |
11 |
locations |
text |
节点坐标信息 |
12 |
connects |
text |
节点连线信息 |
13 |
receivers |
text |
收件人 |
14 |
receivers_cc |
text |
抄送人 |
15 |
create_time |
datetime |
创建时间 |
16 |
timeout |
int(11) |
超时时间 |
17 |
tenant_id |
int(11) |
租户id |
18 |
update_time |
datetime |
更新时间 |
19 |
modify_by |
varchar(36) |
修改用户 |
20 |
resource_ids |
varchar(255) |
资源ids |
其中 process_definition_json 字段为核心字段, 定义了 DAG 图中的任务信息.该数据以JSON 的方式进行存储.
公共的数据结构如下表:
序号 |
字段 |
类型 |
描述 |
1 |
globalParams |
Array |
全局参数 |
2 |
tasks |
Array |
流程中的任务集合 [ 各个类型的结构请参考如下章节] |
3 |
tenantId |
int |
租户id |
4 |
timeout |
int |
超时时间 |
数据示例:
{
"globalParams":[
{
"prop":"golbal_bizdate",
"direct":"IN",
"type":"VARCHAR",
"value":"${system.biz.date}"
}
],
"tasks":Array[1],
"tenantId":0,
"timeout":0
}
2. 各任务类型存储结构详解
2.1 Shell 节点
Shell 节点数据结构如下:
序号 |
参数名 |
类型 |
描述 |
描述 |
|
1 |
id |
String |
任务编码 |
||
2 |
type |
String |
类型 |
SHELL |
|
3 |
name |
String |
名称 |
||
4 |
params |
Object |
自定义参数 |
Json 格式 |
|
5 |
rawScript |
String |
Shell脚本 |
||
6 |
localParams |
Array |
自定义参数 |
||
7 |
resourceList |
Array |
资源文件 |
||
8 |
description |
String |
描述 |
||
9 |
runFlag |
String |
运行标识 |
||
10 |
conditionResult |
Object |
条件分支 |
||
11 |
successNode |
Array |
成功跳转节点 |
||
12 |
failedNode |
Array |
失败跳转节点 |
||
13 |
dependence |
Object |
任务依赖 |
与params互斥 |
|
14 |
maxRetryTimes |
String |
最大重试次数 |
||
15 |
retryInterval |
String |
重试间隔 |
||
16 |
timeout |
Object |
超时控制 |
||
17 |
taskInstancePriority |
String |
任务优先级 |
||
18 |
workerGroup |
String |
Worker 分组 |
||
19 |
preTasks |
Array |
前置任务 |
Shell 节点数据样例:
{
"type":"SHELL",
"id":"tasks-80760",
"name":"Shell Task",
"params":{
"resourceList":[
{
"id":3,
"name":"run.sh",
"res":"run.sh"
}
],
"localParams":[
],
"rawScript":"echo "This is a shell script""
},
"description":"",
"runFlag":"NORMAL",
"conditionResult":{
"successNode":[
""
],
"failedNode":[
""
]
},
"dependence":{
},
"maxRetryTimes":"0",
"retryInterval":"1",
"timeout":{
"strategy":"",
"interval":null,
"enable":false
},
"taskInstancePriority":"MEDIUM",
"workerGroup":"default",
"preTasks":[
]
}
2.2 SQL节点
通过 SQL 对指定的数据源进行数据查询、更新操作.
SQL 节点数据结构如下:
序号 |
参数名 |
类型 |
描述 |
描述 |
|
1 |
id |
String |
任务编码 |
||
2 |
type |
String |
类型 |
SQL |
|
3 |
name |
String |
名称 |
||
4 |
params |
Object |
自定义参数 |
Json 格式 |
|
5 |
type |
String |
数据库类型 |
||
6 |
datasource |
Int |
数据源id |
||
7 |
sql |
String |
查询SQL语句 |
||
8 |
udfs |
String |
udf函数 |
UDF函数id,以逗号分隔. |
|
9 |
sqlType |
String |
SQL节点类型 |
0 查询 , 1 非查询 |
|
10 |
title |
String |
邮件标题 |
||
11 |
receivers |
String |
收件人 |
||
12 |
receiversCc |
String |
抄送人 |
||
13 |
showType |
String |
邮件显示类型 |
TABLE 表格 , ATTACHMENT附件 |
|
14 |
connParams |
String |
连接参数 |
||
15 |
preStatements |
Array |
前置SQL |
||
16 |
postStatements |
Array |
后置SQL |
||
17 |
localParams |
Array |
自定义参数 |
||
18 |
description |
String |
描述 |
||
19 |
runFlag |
String |
运行标识 |
||
20 |
conditionResult |
Object |
条件分支 |
||
21 |
successNode |
Array |
成功跳转节点 |
||
22 |
failedNode |
Array |
失败跳转节点 |
||
23 |
dependence |
Object |
任务依赖 |
与params互斥 |
|
24 |
maxRetryTimes |
String |
最大重试次数 |
||
25 |
retryInterval |
String |
重试间隔 |
||
26 |
timeout |
Object |
超时控制 |
||
27 |
taskInstancePriority |
String |
任务优先级 |
||
28 |
workerGroup |
String |
Worker 分组 |
||
29 |
preTasks |
Array |
前置任务 |
SQL 节点数据样例:
{
"type":"SQL",
"id":"tasks-95648",
"name":"SqlTask-Query",
"params":{
"type":"MYSQL",
"datasource":1,
"sql":"select id , namge , age from emp where id = ${id}",
"udfs":"",
"sqlType":"0",
"title":"xxxx@xxx.com",
"receivers":"xxxx@xxx.com",
"receiversCc":"",
"showType":"TABLE",
"localParams":[
{
"prop":"id",
"direct":"IN",
"type":"INTEGER",
"value":"1"
}
],
"connParams":"",
"preStatements":[
"insert into emp ( id,name ) value (1,'Li' )"
],
"postStatements":[
]
},
"description":"",
"runFlag":"NORMAL",
"conditionResult":{
"successNode":[
""
],
"failedNode":[
""
]
},
"dependence":{
},
"maxRetryTimes":"0",
"retryInterval":"1",
"timeout":{
"strategy":"",
"interval":null,
"enable":false
},
"taskInstancePriority":"MEDIUM",
"workerGroup":"default",
"preTasks":[
]
}
2.2 Spark 节点
Spark 节点数据结构如下:
序号 |
参数名 |
类型 |
描述 |
描述 |
|
1 |
id |
String |
任务编码 |
||
2 |
type |
String |
类型 |
SPARK |
|
3 |
name |
String |
名称 |
||
4 |
params |
Object |
自定义参数 |
Json 格式 |
|
5 |
mainClass |
String |
运行主类 |
||
6 |
mainArgs |
String |
运行参数 |
||
7 |
others |
String |
其他参数 |
||
8 |
mainJar |
Object |
程序 jar 包 |
||
9 |
deployMode |
String |
部署模式 |
local,client,cluster |
|
10 |
driverCores |
String |
driver核数 |
||
11 |
driverMemory |
String |
driver 内存数 |
||
12 |
numExecutors |
String |
executor数量 |
||
13 |
executorMemory |
String |
executor内存 |
||
14 |
executorCores |
String |
executor核数 |
||
15 |
programType |
String |
程序类型 |
JAVA,SCALA,PYTHON |
|
16 |
sparkVersion |
String |
Spark 版本 |
SPARK1 , SPARK2 |
|
17 |
localParams |
Array |
自定义参数 |
||
18 |
resourceList |
Array |
资源文件 |
||
19 |
description |
String |
描述 |
||
20 |
runFlag |
String |
运行标识 |
||
21 |
conditionResult |
Object |
条件分支 |
||
22 |
successNode |
Array |
成功跳转节点 |
||
23 |
failedNode |
Array |
失败跳转节点 |
||
24 |
dependence |
Object |
任务依赖 |
与params互斥 |
|
25 |
maxRetryTimes |
String |
最大重试次数 |
||
26 |
retryInterval |
String |
重试间隔 |
||
27 |
timeout |
Object |
超时控制 |
||
28 |
taskInstancePriority |
String |
任务优先级 |
||
29 |
workerGroup |
String |
Worker 分组 |
||
30 |
preTasks |
Array |
前置任务 |
Spark 节点数据样例:
{
"type":"SPARK",
"id":"tasks-87430",
"name":"SparkTask",
"params":{
"mainClass":"org.apache.spark.examples.SparkPi",
"mainJar":{
"id":4
},
"deployMode":"cluster",
"resourceList":[
{
"id":3,
"name":"run.sh",
"res":"run.sh"
}
],
"localParams":[
],
"driverCores":1,
"driverMemory":"512M",
"numExecutors":2,
"executorMemory":"2G",
"executorCores":2,
"mainArgs":"10",
"others":"",
"programType":"SCALA",
"sparkVersion":"SPARK2"
},
"description":"",
"runFlag":"NORMAL",
"conditionResult":{
"successNode":[
""
],
"failedNode":[
""
]
},
"dependence":{
},
"maxRetryTimes":"0",
"retryInterval":"1",
"timeout":{
"strategy":"",
"interval":null,
"enable":false
},
"taskInstancePriority":"MEDIUM",
"workerGroup":"default",
"preTasks":[
]
}
2.3 MapReduce(MR)节点
MapReduce(MR) 节点数据结构如下:
序号 |
参数名 |
类型 |
描述 |
描述 |
|
1 |
id |
String |
任务编码 |
||
2 |
type |
String |
类型 |
MR |
|
3 |
name |
String |
名称 |
||
4 |
params |
Object |
自定义参数 |
Json 格式 |
|
5 |
mainClass |
String |
运行主类 |
||
6 |
mainArgs |
String |
运行参数 |
||
7 |
others |
String |
其他参数 |
||
8 |
mainJar |
Object |
程序 jar 包 |
||
9 |
programType |
String |
程序类型 |
JAVA,PYTHON |
|
10 |
localParams |
Array |
自定义参数 |
||
11 |
resourceList |
Array |
资源文件 |
||
12 |
description |
String |
描述 |
||
13 |
runFlag |
String |
运行标识 |
||
14 |
conditionResult |
Object |
条件分支 |
||
15 |
successNode |
Array |
成功跳转节点 |
||
16 |
failedNode |
Array |
失败跳转节点 |
||
17 |
dependence |
Object |
任务依赖 |
与params互斥 |
|
18 |
maxRetryTimes |
String |
最大重试次数 |
||
19 |
retryInterval |
String |
重试间隔 |
||
20 |
timeout |
Object |
超时控制 |
||
21 |
taskInstancePriority |
String |
任务优先级 |
||
22 |
workerGroup |
String |
Worker 分组 |
||
23 |
preTasks |
Array |
前置任务 |
MapReduce(MR) 节点数据样例:
{
"type":"MR",
"id":"tasks-28997",
"name":"MRTask",
"params":{
"mainClass":"wordcount",
"mainJar":{
"id":5
},
"resourceList":[
{
"id":3,
"name":"run.sh",
"res":"run.sh"
}
],
"localParams":[
],
"mainArgs":"/tmp/wordcount/input /tmp/wordcount/output/",
"others":"",
"programType":"JAVA"
},
"description":"",
"runFlag":"NORMAL",
"conditionResult":{
"successNode":[
""
],
"failedNode":[
""
]
},
"dependence":{
},
"maxRetryTimes":"0",
"retryInterval":"1",
"timeout":{
"strategy":"",
"interval":null,
"enable":false
},
"taskInstancePriority":"MEDIUM",
"workerGroup":"default",
"preTasks":[
]
}
2.4 Python节点
Python 节点数据结构如下:
序号 |
参数名 |
类型 |
描述 |
描述 |
|
1 |
id |
String |
任务编码 |
||
2 |
type |
String |
类型 |
PYTHON |
|
3 |
name |
String |
名称 |
||
4 |
params |
Object |
自定义参数 |
Json 格式 |
|
5 |
rawScript |
String |
Python脚本 |
||
6 |
localParams |
Array |
自定义参数 |
||
7 |
resourceList |
Array |
资源文件 |
||
8 |
description |
String |
描述 |
||
9 |
runFlag |
String |
运行标识 |
||
10 |
conditionResult |
Object |
条件分支 |
||
11 |
successNode |
Array |
成功跳转节点 |
||
12 |
failedNode |
Array |
失败跳转节点 |
||
13 |
dependence |
Object |
任务依赖 |
与params互斥 |
|
14 |
maxRetryTimes |
String |
最大重试次数 |
||
15 |
retryInterval |
String |
重试间隔 |
||
16 |
timeout |
Object |
超时控制 |
||
17 |
taskInstancePriority |
String |
任务优先级 |
||
18 |
workerGroup |
String |
Worker 分组 |
||
19 |
preTasks |
Array |
前置任务 |
Python 节点数据样例:
{
"type":"PYTHON",
"id":"tasks-5463",
"name":"Python Task",
"params":{
"resourceList":[
{
"id":3,
"name":"run.sh",
"res":"run.sh"
}
],
"localParams":[
],
"rawScript":"print("This is a python script")"
},
"description":"",
"runFlag":"NORMAL",
"conditionResult":{
"successNode":[
""
],
"failedNode":[
""
]
},
"dependence":{
},
"maxRetryTimes":"0",
"retryInterval":"1",
"timeout":{
"strategy":"",
"interval":null,
"enable":false
},
"taskInstancePriority":"MEDIUM",
"workerGroup":"default",
"preTasks":[
]
}
2.5 Flink 节点
Flink 节点数据结构如下:
序号 |
参数名 |
类型 |
描述 |
描述 |
|
1 |
id |
String |
任务编码 |
||
2 |
type |
String |
类型 |
FLINK |
|
3 |
name |
String |
名称 |
||
4 |
params |
Object |
自定义参数 |
Json 格式 |
|
5 |
mainClass |
String |
运行主类 |
||
6 |
mainArgs |
String |
运行参数 |
||
7 |
others |
String |
其他参数 |
||
8 |
mainJar |
Object |
程序 jar 包 |
||
9 |
deployMode |
String |
部署模式 |
local,client,cluster |
|
10 |
slot |
String |
slot数量 |
||
11 |
taskManager |
String |
taskManage数量 |
||
12 |
taskManagerMemory |
String |
taskManager内存数 |
||
13 |
jobManagerMemory |
String |
jobManager内存数 |
||
14 |
programType |
String |
程序类型 |
JAVA,SCALA,PYTHON |
|
15 |
localParams |
Array |
自定义参数 |
||
16 |
resourceList |
Array |
资源文件 |
||
17 |
description |
String |
描述 |
||
18 |
runFlag |
String |
运行标识 |
||
19 |
conditionResult |
Object |
条件分支 |
||
20 |
successNode |
Array |
成功跳转节点 |
||
21 |
failedNode |
Array |
失败跳转节点 |
||
22 |
dependence |
Object |
任务依赖 |
与params互斥 |
|
23 |
maxRetryTimes |
String |
最大重试次数 |
||
24 |
retryInterval |
String |
重试间隔 |
||
25 |
timeout |
Object |
超时控制 |
||
26 |
taskInstancePriority |
String |
任务优先级 |
||
27 |
workerGroup |
String |
Worker 分组 |
||
38 |
preTasks |
Array |
前置任务 |
Flink 节点数据样例:
{
"type":"FLINK",
"id":"tasks-17135",
"name":"FlinkTask",
"params":{
"mainClass":"com.flink.demo",
"mainJar":{
"id":6
},
"deployMode":"cluster",
"resourceList":[
{
"id":3,
"name":"run.sh",
"res":"run.sh"
}
],
"localParams":[
],
"slot":1,
"taskManager":"2",
"jobManagerMemory":"1G",
"taskManagerMemory":"2G",
"executorCores":2,
"mainArgs":"100",
"others":"",
"programType":"SCALA"
},
"description":"",
"runFlag":"NORMAL",
"conditionResult":{
"successNode":[
""
],
"failedNode":[
""
]
},
"dependence":{
},
"maxRetryTimes":"0",
"retryInterval":"1",
"timeout":{
"strategy":"",
"interval":null,
"enable":false
},
"taskInstancePriority":"MEDIUM",
"workerGroup":"default",
"preTasks":[
]
}
2.6 Http 节点
Http 节点数据结构如下:
序号 |
参数名 |
类型 |
描述 |
描述 |
|
1 |
id |
String |
任务编码 |
||
2 |
type |
String |
类型 |
HTTP |
|
3 |
name |
String |
名称 |
||
4 |
params |
Object |
自定义参数 |
Json 格式 |
|
5 |
url |
String |
请求地址 |
||
6 |
httpMethod |
String |
请求方式 |
GET,POST,HEAD,PUT,DELETE |
|
7 |
httpParams |
Array |
请求参数 |
||
8 |
httpCheckCondition |
String |
校验条件 |
默认响应码200 |
|
9 |
condition |
String |
校验内容 |
||
10 |
localParams |
Array |
自定义参数 |
||
11 |
description |
String |
描述 |
||
12 |
runFlag |
String |
运行标识 |
||
13 |
conditionResult |
Object |
条件分支 |
||
14 |
successNode |
Array |
成功跳转节点 |
||
15 |
failedNode |
Array |
失败跳转节点 |
||
16 |
dependence |
Object |
任务依赖 |
与params互斥 |
|
17 |
maxRetryTimes |
String |
最大重试次数 |
||
18 |
retryInterval |
String |
重试间隔 |
||
19 |
timeout |
Object |
超时控制 |
||
20 |
taskInstancePriority |
String |
任务优先级 |
||
21 |
workerGroup |
String |
Worker 分组 |
||
22 |
preTasks |
Array |
前置任务 |
Http 节点数据样例:
{
"type":"HTTP",
"id":"tasks-60499",
"name":"HttpTask",
"params":{
"localParams":[
],
"httpParams":[
{
"prop":"id",
"httpParametersType":"PARAMETER",
"value":"1"
},
{
"prop":"name",
"httpParametersType":"PARAMETER",
"value":"Bo"
}
],
"url":"https://www.xxxxx.com:9012",
"httpMethod":"POST",
"httpCheckCondition":"STATUS_CODE_DEFAULT",
"condition":""
},
"description":"",
"runFlag":"NORMAL",
"conditionResult":{
"successNode":[
""
],
"failedNode":[
""
]
},
"dependence":{
},
"maxRetryTimes":"0",
"retryInterval":"1",
"timeout":{
"strategy":"",
"interval":null,
"enable":false
},
"taskInstancePriority":"MEDIUM",
"workerGroup":"default",
"preTasks":[
]
}
2.7 DataX 节点
DataX 节点数据结构如下:
序号 |
参数名 |
类型 |
描述 |
描述 |
|
1 |
id |
String |
任务编码 |
||
2 |
type |
String |
类型 |
DATAX |
|
3 |
name |
String |
名称 |
||
4 |
params |
Object |
自定义参数 |
Json 格式 |
|
5 |
customConfig |
Int |
自定义类型 |
0定制 , 1自定义 |
|
6 |
dsType |
String |
源数据库类型 |
||
7 |
dataSource |
Int |
源数据库ID |
||
8 |
dtType |
String |
目标数据库类型 |
||
9 |
dataTarget |
Int |
目标数据库ID |
||
10 |
sql |
String |
SQL语句 |
||
11 |
targetTable |
String |
目标表 |
||
12 |
jobSpeedByte |
Int |
限流(字节数) |
||
13 |
jobSpeedRecord |
Int |
限流(记录数) |
||
14 |
preStatements |
Array |
前置SQL |
||
15 |
postStatements |
Array |
后置SQL |
||
16 |
json |
String |
自定义配置 |
customConfig=1时生效 |
|
17 |
localParams |
Array |
自定义参数 |
customConfig=1时生效 |
|
18 |
description |
String |
描述 |
||
19 |
runFlag |
String |
运行标识 |
||
20 |
conditionResult |
Object |
条件分支 |
||
21 |
successNode |
Array |
成功跳转节点 |
||
22 |
failedNode |
Array |
失败跳转节点 |
||
23 |
dependence |
Object |
任务依赖 |
与params互斥 |
|
24 |
maxRetryTimes |
String |
最大重试次数 |
||
25 |
retryInterval |
String |
重试间隔 |
||
26 |
timeout |
Object |
超时控制 |
||
27 |
taskInstancePriority |
String |
任务优先级 |
||
28 |
workerGroup |
String |
Worker 分组 |
||
29 |
preTasks |
Array |
前置任务 |
DataX 节点数据样例:
{
"type":"DATAX",
"id":"tasks-91196",
"name":"DataxTask-DB",
"params":{
"customConfig":0,
"dsType":"MYSQL",
"dataSource":1,
"dtType":"MYSQL",
"dataTarget":1,
"sql":"select id, name ,age from user ",
"targetTable":"emp",
"jobSpeedByte":524288,
"jobSpeedRecord":500,
"preStatements":[
"truncate table emp "
],
"postStatements":[
"truncate table user"
]
},
"description":"",
"runFlag":"NORMAL",
"conditionResult":{
"successNode":[
""
],
"failedNode":[
""
]
},
"dependence":{
},
"maxRetryTimes":"0",
"retryInterval":"1",
"timeout":{
"strategy":"",
"interval":null,
"enable":false
},
"taskInstancePriority":"MEDIUM",
"workerGroup":"default",
"preTasks":[
]
}
2.8 Sqoop节点
Sqoop 节点数据结构如下:
序号 |
参数名 |
类型 |
描述 |
描述 |
|
1 |
id |
String |
任务编码 |
||
2 |
type |
String |
类型 |
SQOOP |
|
3 |
name |
String |
名称 |
||
4 |
params |
Object |
自定义参数 |
JSON 格式 |
|
5 |
concurrency |
Int |
并发度 |
||
6 |
modelType |
String |
流向 |
import,export |
|
7 |
sourceType |
String |
数据源类型 |
||
8 |
sourceParams |
String |
数据源参数 |
JSON格式 |
|
9 |
targetType |
String |
目标数据类型 |
||
10 |
targetParams |
String |
目标数据参数 |
JSON格式 |
|
11 |
localParams |
Array |
自定义参数 |
||
12 |
description |
String |
描述 |
||
13 |
runFlag |
String |
运行标识 |
||
14 |
conditionResult |
Object |
条件分支 |
||
15 |
successNode |
Array |
成功跳转节点 |
||
16 |
failedNode |
Array |
失败跳转节点 |
||
17 |
dependence |
Object |
任务依赖 |
与params互斥 |
|
18 |
maxRetryTimes |
String |
最大重试次数 |
||
19 |
retryInterval |
String |
重试间隔 |
||
20 |
timeout |
Object |
超时控制 |
||
21 |
taskInstancePriority |
String |
任务优先级 |
||
22 |
workerGroup |
String |
Worker 分组 |
||
23 |
preTasks |
Array |
前置任务 |
Sqoop节点数据样例:
{
"type":"SQOOP",
"id":"tasks-82041",
"name":"Sqoop Task",
"params":{
"concurrency":1,
"modelType":"import",
"sourceType":"MYSQL",
"targetType":"HDFS",
"sourceParams":"{"srcType":"MYSQL","srcDatasource":1,"srcTable":"","srcQueryType":"1","srcQuerySql":"selec id , name from user","srcColumnType":"0","srcColumns":"","srcConditionList":[],"mapColumnHive":[{"prop":"hivetype-key","direct":"IN","type":"VARCHAR","value":"hivetype-value"}],"mapColumnJava":[{"prop":"javatype-key","direct":"IN","type":"VARCHAR","value":"javatype-value"}]}",
"targetParams":"{"targetPath":"/user/hive/warehouse/ods.db/user","deleteTargetDir":false,"fileType":"--as-avrodatafile","compressionCodec":"snappy","fieldsTerminated":",","linesTerminated":"@"}",
"localParams":[
]
},
"description":"",
"runFlag":"NORMAL",
"conditionResult":{
"successNode":[
""
],
"failedNode":[
""
]
},
"dependence":{
},
"maxRetryTimes":"0",
"retryInterval":"1",
"timeout":{
"strategy":"",
"interval":null,
"enable":false
},
"taskInstancePriority":"MEDIUM",
"workerGroup":"default",
"preTasks":[
]
}
2.9 条件分支节点
条件分支节点数据结构如下:
序号 |
参数名 |
类型 |
描述 |
描述 |
|
1 |
id |
String |
任务编码 |
||
2 |
type |
String |
类型 |
SHELL |
|
3 |
name |
String |
名称 |
||
4 |
params |
Object |
自定义参数 |
null |
|
5 |
description |
String |
描述 |
||
6 |
runFlag |
String |
运行标识 |
||
7 |
conditionResult |
Object |
条件分支 |
||
8 |
successNode |
Array |
成功跳转节点 |
||
9 |
failedNode |
Array |
失败跳转节点 |
||
10 |
dependence |
Object |
任务依赖 |
与params互斥 |
|
11 |
maxRetryTimes |
String |
最大重试次数 |
||
12 |
retryInterval |
String |
重试间隔 |
||
13 |
timeout |
Object |
超时控制 |
||
14 |
taskInstancePriority |
String |
任务优先级 |
||
15 |
workerGroup |
String |
Worker 分组 |
||
16 |
preTasks |
Array |
前置任务 |
条件分支节点数据样例:
{
"type":"CONDITIONS",
"id":"tasks-96189",
"name":"条件",
"params":{
},
"description":"",
"runFlag":"NORMAL",
"conditionResult":{
"successNode":[
"test04"
],
"failedNode":[
"test05"
]
},
"dependence":{
"relation":"AND",
"dependTaskList":[
]
},
"maxRetryTimes":"0",
"retryInterval":"1",
"timeout":{
"strategy":"",
"interval":null,
"enable":false
},
"taskInstancePriority":"MEDIUM",
"workerGroup":"default",
"preTasks":[
"test01",
"test02"
]
}
2.10 子流程节点
子流程节点数据结构如下:
序号 |
参数名 |
类型 |
描述 |
描述 |
|
1 |
id |
String |
任务编码 |
||
2 |
type |
String |
类型 |
SHELL |
|
3 |
name |
String |
名称 |
||
4 |
params |
Object |
自定义参数 |
Json 格式 |
|
5 |
processDefinitionId |
Int |
流程定义id |
||
6 |
description |
String |
描述 |
||
7 |
runFlag |
String |
运行标识 |
||
8 |
conditionResult |
Object |
条件分支 |
||
9 |
successNode |
Array |
成功跳转节点 |
||
10 |
failedNode |
Array |
失败跳转节点 |
||
11 |
dependence |
Object |
任务依赖 |
与params互斥 |
|
12 |
maxRetryTimes |
String |
最大重试次数 |
||
13 |
retryInterval |
String |
重试间隔 |
||
14 |
timeout |
Object |
超时控制 |
||
15 |
taskInstancePriority |
String |
任务优先级 |
||
16 |
workerGroup |
String |
Worker 分组 |
||
17 |
preTasks |
Array |
前置任务 |
子流程节点数据样例:
{
"type":"SUB_PROCESS",
"id":"tasks-14806",
"name":"SubProcessTask",
"params":{
"processDefinitionId":2
},
"description":"",
"runFlag":"NORMAL",
"conditionResult":{
"successNode":[
""
],
"failedNode":[
""
]
},
"dependence":{
},
"timeout":{
"strategy":"",
"interval":null,
"enable":false
},
"taskInstancePriority":"MEDIUM",
"workerGroup":"default",
"preTasks":[
]
}
2.11 依赖(DEPENDENT)节点
依赖(DEPENDENT)节点数据结构如下:
序号 |
参数名 |
类型 |
描述 |
描述 |
|
1 |
id |
String |
任务编码 |
||
2 |
type |
String |
类型 |
DEPENDENT |
|
3 |
name |
String |
名称 |
||
4 |
params |
Object |
自定义参数 |
Json 格式 |
|
5 |
rawScript |
String |
Shell脚本 |
||
6 |
localParams |
Array |
自定义参数 |
||
7 |
resourceList |
Array |
资源文件 |
||
8 |
description |
String |
描述 |
||
9 |
runFlag |
String |
运行标识 |
||
10 |
conditionResult |
Object |
条件分支 |
||
11 |
successNode |
Array |
成功跳转节点 |
||
12 |
failedNode |
Array |
失败跳转节点 |
||
13 |
dependence |
Object |
任务依赖 |
与params互斥 |
|
14 |
relation |
String |
关系 |
AND,OR |
|
15 |
dependTaskList |
Array |
依赖任务清单 |
||
16 |
maxRetryTimes |
String |
最大重试次数 |
||
17 |
retryInterval |
String |
重试间隔 |
||
18 |
timeout |
Object |
超时控制 |
||
19 |
taskInstancePriority |
String |
任务优先级 |
||
20 |
workerGroup |
String |
Worker 分组 |
||
21 |
preTasks |
Array |
前置任务 |
依赖(DEPENDENT)节点数据样例:
{
"type":"DEPENDENT",
"id":"tasks-57057",
"name":"DenpendentTask",
"params":{
},
"description":"",
"runFlag":"NORMAL",
"conditionResult":{
"successNode":[
""
],
"failedNode":[
""
]
},
"dependence":{
"relation":"AND",
"dependTaskList":[
{
"relation":"AND",
"dependItemList":[
{
"projectId":1,
"definitionId":7,
"definitionList":[
{
"value":8,
"label":"MRTask"
},
{
"value":7,
"label":"FlinkTask"
},
{
"value":6,
"label":"SparkTask"
},
{
"value":5,
"label":"SqlTask-Update"
},
{
"value":4,
"label":"SqlTask-Query"
},
{
"value":3,
"label":"SubProcessTask"
},
{
"value":2,
"label":"Python Task"
},
{
"value":1,
"label":"Shell Task"
}
],
"depTasks":"ALL",
"cycle":"day",
"dateValue":"today"
}
]
},
{
"relation":"AND",
"dependItemList":[
{
"projectId":1,
"definitionId":5,
"definitionList":[
{
"value":8,
"label":"MRTask"
},
{
"value":7,
"label":"FlinkTask"
},
{
"value":6,
"label":"SparkTask"
},
{
"value":5,
"label":"SqlTask-Update"
},
{
"value":4,
"label":"SqlTask-Query"
},
{
"value":3,
"label":"SubProcessTask"
},
{
"value":2,
"label":"Python Task"
},
{
"value":1,
"label":"Shell Task"
}
],
"depTasks":"SqlTask-Update",
"cycle":"day",
"dateValue":"today"
}
]
}
]
},
"maxRetryTimes":"0",
"retryInterval":"1",
"timeout":{
"strategy":"",
"interval":null,
"enable":false
},
"taskInstancePriority":"MEDIUM",
"workerGroup":"default",
"preTasks":[
]
}
DolphinScheduler 社区介绍:
Apache DolphinScheduler 是一个非常多样化的社区,至今贡献者已近100名, 他们分别来自 30 多家不同的公司。 微信群用户3000人。
Apache DolphinScheduler 部分用户案例(排名不分先后)
已经有300多家企业和科研机构在使用DolphinScheduler,来处理各类调度和定时任务,另有500多家公司开通了海豚调度的试用:
Apache DolphinScheduler项目起源 - 需求决定
Apache DolphinScheduler四大特性
Apache DolphinScheduler 能力:
以DAG图的方式将Task按照任务的依赖关系关联起来,可实时可视化监控任务的运行状态
支持丰富的任务类型:Shell、MR、Spark、Flink、SQL(mysql、postgresql、hive、sparksql)、Python、Http、Sub_Process、Procedure等
支持工作流定时调度、依赖调度、手动调度、手动暂停/停止/恢复,同时支持失败重试/告警、从指定节点恢复失败、Kill任务等操作
支持工作流优先级、任务优先级及任务的故障转移及任务超时告警/失败
支持工作流全局参数及节点自定义参数设置
支持资源文件的在线上传/下载,管理等,支持在线文件创建、编辑
支持任务日志在线查看及滚动、在线下载日志等
实现集群HA,通过Zookeeper实现Master集群和Worker集群去中心化
支持对
Master/Worker
cpu load,memory,cpu在线查看支持工作流运行历史树形/甘特图展示、支持任务状态统计、流程状态统计
支持补数
支持多租户
支持国际化
Apache DolphinScheduler 1.3 新特性
Worker实现重构,提升Worker性能
Master和Worker引入Netty通信
去zookeeper任务队列
Worker节点的三种选择:随机、循环和CPU和内存的线性加权负载平衡
Worker去数据库操作
资源中心支持多目录
添加 if/else 条件任务
添加 sqoop/datax 任务
支持 k8s 部署
添加DAG流程图一键格式化
流程图美化
支持 ambari 插件安装
批量导出和导入工作流
流程定义支持复制
大幅简化配置项,简化部署
系统部分截图
在线DEMO试用
http://106.75.43.194:8888/
DolphinScheduler Slogan
加入 Apache DolphinScheduler
在使用 DolphinScheduler 的过程中,如果您有任何问题或者想法、建议,都可以通过Apache 邮件列表参与到 DolphinScheduler 的社区建设中来。
欢迎加入贡献的队伍,加入开源社区从提交第一个 PR开始,
- 找到带有”easy to fix”标记或者一些非常简单的issue(比如拼写错误等),先通过第一个PR熟悉提交流程,如果有任何疑问,欢迎联系
强烈推荐订阅开发邮件列表,与社区保持最新信息同步,这一点非常重要。
近期好文推荐:《美女 Committer 手把手教你使用海豚调度》
DolphinScheduler - 1.3 系列核心表结构剖析的更多相关文章
- Apache DolphinScheduler(海豚调度) - 1.3 系列核心表结构剖析
Apache DolphinScheduler 是一个分布式去中心化,易扩展的可视化 DAG 工作流任务调度系统.致力于解决数据处理流程中错综复杂的依赖关系,使调度系统在数据处理流程中开箱即用. 近日 ...
- activiti数据库表结构剖析
1.结构设计 1.1. 逻辑结构设计 Activiti使用到的表都是ACT_开头的. ACT_RE_*: ’RE’表示repository(存储),RepositoryService接口所操作的 ...
- 【原创】大数据基础之Hive(4)hive元数据库核心表结构
1 dbs +-------+-----------------------+----------------------------------------------+------------+- ...
- Oracle 学习系列之一(表空间与表结构)
create tablespace user3 datafile 'e:\test\user3_data.dbf' size 20M --表空间初始大小为: 20Mautoextend on next ...
- 5、ABPZero系列教程之拼多多卖家工具 修改User表结构
毕竟这个框架是外国人开发的,对于我们国人来说还是有些地方并不合适,就好比如注册时需要填写名字.姓氏一样,今天要说的就是如何去掉这2个字段. 先看如下修改完成的效果图 User表结构修改 修改User类 ...
- Java字节码方法表结构深度剖析
继续上一次[https://www.cnblogs.com/webor2006/p/9459681.html]的字节码分析,这次来分析一下最为复杂的方法表的信息,如下: 而上一次分析到了属性表的位置在 ...
- 基于SpringBoot从零构建博客网站 - 确定需求和表结构
要确定一个系统的需求,首先需要明确该系统的用户有哪些,然后针对每一类用户,确定其需求.对于博客网站来说,用户有3大类,分别是: 作者,也即是注册用户 游客,也即非注册用户 管理员,网站维护人员 那么从 ...
- (转)pt-online-schema-change在线修改表结构
原文:http://www.ywnds.com/?p=4442 一.背景 MySQL大字段的DDL操作:加减字段.索引.修改字段属性等,在5.1之前都是非常耗时耗力的,特别是会对MySQL服务产生影响 ...
- 结合RBAC模型讲解权限管理系统需求及表结构创建
在本号之前的文章中,已经为大家介绍了很多关于Spring Security的使用方法,也介绍了RBAC的基于角色权限控制模型.但是很多朋友虽然已经理解了RBAC控制模型,但是仍有很多的问题阻碍他们进一 ...
随机推荐
- 【单片机】CH32V103v8t6开发板调试笔记
一.开发板样式和资源 找官网的商务申请了一块开发板,打算试一下串口打印程序测试,发现网上关于这个板子的相关资料特别少,为方便后来人,就顺便记录一下,板子资源如下图所示. 板子芯片的引脚排布图 二.使用 ...
- ES6 Promise 的链式调用
1.什么是Promise Promise 对象代表了未来将要发生的事件,用来传递异步操作的消息. 2.对象的状态不受外界影响.Promise 对象代表一个异步操作,有三种状态: pending: 初始 ...
- thusc2022游记
DAY -1: 刷往年相关的题 DAY 0: 刷会儿题了,搞电脑,下obs.不过,发现电脑出了很多问题. obs没有录频效果,因为卡,杀毒软件把vc++全都删了.因此无dll文件错误,搞了一晚上都没搞 ...
- 如何在 pyqt 中捕获并处理 Alt+F4 快捷键
前言 如果在 Windows 系统的任意一个窗口中按下 Alt+F4,默认行为是关闭窗口(或者最小化到托盘).对于使用了亚克力效果的窗口,使用 Alt+F4 最小化到托盘,再次弹出窗口的时候可能出现亚 ...
- VSCode进一步深入了解学习
紧接上一章节趁热打铁吧,未关注博主的记得关注哦! VSCode设置 (1)关闭预览模式 我们在 VScode 上打开一个新文件的话会覆盖掉以前的文件,这是因为 VSCode 默认开启了预览模式,预览模 ...
- Docker-Compose实现Mysql主从
1. 简介 通过使用docker-compose 搭建一个主从数据库,本示例为了解耦 将两个server拆分到了两个compose文件中,当然也可以放到一个compose文件中 演示mysql版本:5 ...
- 关闭StackExchange等平台的privacy收集窗口
技术背景 当我们打开一个StackExchange页面的时候,经常会出现一个很大的privacy收集窗口,而且不管怎么点都关闭不了,比如像下图这样: 如果屏幕足够大,影响可能也不是很大,但是关键是对于 ...
- SE37 绕过权限检查 ALINK_CALL_TRANSACTION
- UiPath官方视频Level2
[UiPath官方视频Level2]Lesson Orchestrator-第5部分 https://www.bilibili.com/video/av81414017 [UiPath官方视频Leve ...
- iostat、vmstat、iftop命令详解
1.安装iostat命令 yum install sysstat -y 用法:iostat [ 选项 ] [ <时间间隔> [ <次数> ]] 常用选项说明: -c:只显示系统 ...