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/Workercpu 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控制模型,但是仍有很多的问题阻碍他们进一 ...
随机推荐
- K8S 使用Kubeadm搭建单个Master节点的Kubernetes(K8S)~本文仅用于测试学习
01.集群规划 系统版本:CentOS Linux release 7.6.1810 (Core) 软件版本:kubeadm.kubernetes-1.15.docker-ce-18.09 硬件要求: ...
- 【SpringCloud原理】万字剖析OpenFeign之FeignClient动态代理生成源码
年前的时候我发布两篇关于nacos源码的文章,一篇是聊一聊nacos是如何进行服务注册的,另一篇是一文带你看懂nacos是如何整合springcloud -- 注册中心篇.今天就继续接着剖析Sprin ...
- 【Java】在IDEA中将Javafx项目打包成为可运行的.jar文件
在使用Javafx制作一个图形化界面程序的时候,我遇到了打包文件的难题. 按照网上给出的解决方案构建出来的jar文件总是没有办法运行. 以下是我最终的解决方案. 我使用的IDE是IntelliJ ID ...
- 关于mybatis的应用
导入依赖 <dependencies> <dependency> <groupId>org.mybatis</groupId> <artifact ...
- Go微服务框架go-kratos实战03:使用 gorm 实现增删改查操作
一.简介 在上一篇文章 go-kratos实战02 中,详细介绍了用 kratos 编写项目代码的步骤.这篇就在上篇基础上,再结合 Go 数据库操作库 gorm 一步一步来实现一个简单的增删改查操作. ...
- 【原创】渗透神器CoblatStrike实践(1)
渗透神器CoblatStrike实践(1) 前言 正常的渗透测试: 寻找漏洞,利用漏洞,拿到一定的权限 后渗透(CS为代表的): 提升权限,内网渗透,权限维持 工具地址(非官方取到后门多,建议 ...
- MySQLDocker 主从复制搭建
MySQLDocker 主从复制搭建 MySQLDocker 的搭建 docker search mysql docker pull mysql/mysql-server:8.0.26 docker ...
- while循环、do..while循环
While循环 While循环呢它是更具条件来判断是否执行大括号里的内容 ,只要条件成立就会一值执行直到不满足条件它的语法格式: while(循环条件){ 执行语句 }那么我们来做一个小测试看看: p ...
- Camunda如何配置和使用mysql数据库
Camunda默认使用已预先配置好的H2数据库,数据库模式和所有必需的表将在引擎第一次启动时自动创建.如果你想使用自定义独立数据库,比如mysql,请遵循以下步骤: 一.新建mysql数据库 为Cam ...
- 获取在线ip
/** * 获取在线IP * @return String */ function getOnlineIp($format=0) { global $S_GLOBAL; if(empty($S_GLO ...