Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
DolphinScheduler
提交
2862f5b6
DolphinScheduler
项目概览
apache
/
DolphinScheduler
上一次同步 1 年多
通知
707
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,发现更多精彩内容 >>
未验证
提交
2862f5b6
编写于
8月 18, 2022
作者:
W
Wenjun Ruan
提交者:
GitHub
8月 18, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Set process instance and task priority default value as 2 (#11539)
上级
c3223678
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
35 addition
and
19 deletion
+35
-19
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/SchedulerController.java
.../dolphinscheduler/api/controller/SchedulerController.java
+1
-1
dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_h2.sql
...eduler-dao/src/main/resources/sql/dolphinscheduler_h2.sql
+6
-6
dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_mysql.sql
...ler-dao/src/main/resources/sql/dolphinscheduler_mysql.sql
+6
-6
dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_postgresql.sql
...ao/src/main/resources/sql/dolphinscheduler_postgresql.sql
+6
-6
dolphinscheduler-dao/src/main/resources/sql/upgrade/3.1.0_schema/mysql/dolphinscheduler_ddl.sql
...s/sql/upgrade/3.1.0_schema/mysql/dolphinscheduler_ddl.sql
+8
-0
dolphinscheduler-dao/src/main/resources/sql/upgrade/3.1.0_schema/postgresql/dolphinscheduler_ddl.sql
.../upgrade/3.1.0_schema/postgresql/dolphinscheduler_ddl.sql
+8
-0
未找到文件。
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/SchedulerController.java
浏览文件 @
2862f5b6
...
...
@@ -160,7 +160,7 @@ public class SchedulerController extends BaseController {
@RequestParam
(
value
=
"failureStrategy"
,
required
=
false
,
defaultValue
=
"END"
)
FailureStrategy
failureStrategy
,
@RequestParam
(
value
=
"workerGroup"
,
required
=
false
,
defaultValue
=
"default"
)
String
workerGroup
,
@RequestParam
(
value
=
"environmentCode"
,
required
=
false
,
defaultValue
=
"-1"
)
Long
environmentCode
,
@RequestParam
(
value
=
"processInstancePriority"
,
required
=
false
)
Priority
processInstancePriority
)
{
@RequestParam
(
value
=
"processInstancePriority"
,
required
=
false
,
defaultValue
=
DEFAULT_PROCESS_INSTANCE_PRIORITY
)
Priority
processInstancePriority
)
{
Map
<
String
,
Object
>
result
=
schedulerService
.
updateSchedule
(
loginUser
,
projectCode
,
id
,
schedule
,
warningType
,
warningGroupId
,
failureStrategy
,
processInstancePriority
,
workerGroup
,
environmentCode
);
...
...
dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_h2.sql
浏览文件 @
2862f5b6
...
...
@@ -331,7 +331,7 @@ CREATE TABLE t_ds_command
start_time
datetime
DEFAULT
NULL
,
executor_id
int
(
11
)
DEFAULT
NULL
,
update_time
datetime
DEFAULT
NULL
,
process_instance_priority
int
(
11
)
DEFAULT
NULL
,
process_instance_priority
int
(
11
)
DEFAULT
'2'
,
worker_group
varchar
(
64
),
environment_code
bigint
(
20
)
DEFAULT
'-1'
,
dry_run
int
NULL
DEFAULT
0
,
...
...
@@ -385,7 +385,7 @@ CREATE TABLE t_ds_error_command
schedule_time
datetime
DEFAULT
NULL
,
start_time
datetime
DEFAULT
NULL
,
update_time
datetime
DEFAULT
NULL
,
process_instance_priority
int
(
11
)
DEFAULT
NULL
,
process_instance_priority
int
(
11
)
DEFAULT
'2'
,
worker_group
varchar
(
64
),
environment_code
bigint
(
20
)
DEFAULT
'-1'
,
message
text
,
...
...
@@ -476,7 +476,7 @@ CREATE TABLE t_ds_task_definition
task_execute_type
int
(
11
)
DEFAULT
'0'
,
task_params
longtext
,
flag
tinyint
(
2
)
DEFAULT
NULL
,
task_priority
tinyint
(
4
)
DEFAULT
NULL
,
task_priority
tinyint
(
4
)
DEFAULT
'2'
,
worker_group
varchar
(
200
)
DEFAULT
NULL
,
environment_code
bigint
(
20
)
DEFAULT
'-1'
,
fail_retry_times
int
(
11
)
DEFAULT
NULL
,
...
...
@@ -512,7 +512,7 @@ CREATE TABLE t_ds_task_definition_log
task_execute_type
int
(
11
)
DEFAULT
'0'
,
task_params
text
,
flag
tinyint
(
2
)
DEFAULT
NULL
,
task_priority
tinyint
(
4
)
DEFAULT
NULL
,
task_priority
tinyint
(
4
)
DEFAULT
'2'
,
worker_group
varchar
(
200
)
DEFAULT
NULL
,
environment_code
bigint
(
20
)
DEFAULT
'-1'
,
fail_retry_times
int
(
11
)
DEFAULT
NULL
,
...
...
@@ -610,7 +610,7 @@ CREATE TABLE t_ds_process_instance
is_sub_process
int
(
11
)
DEFAULT
'0'
,
executor_id
int
(
11
)
NOT
NULL
,
history_cmd
text
,
process_instance_priority
int
(
11
)
DEFAULT
NULL
,
process_instance_priority
int
(
11
)
DEFAULT
'2'
,
worker_group
varchar
(
64
)
DEFAULT
NULL
,
environment_code
bigint
(
20
)
DEFAULT
'-1'
,
timeout
int
(
11
)
DEFAULT
'0'
,
...
...
@@ -803,7 +803,7 @@ CREATE TABLE t_ds_schedules
release_state
tinyint
(
4
)
NOT
NULL
,
warning_type
tinyint
(
4
)
NOT
NULL
,
warning_group_id
int
(
11
)
DEFAULT
NULL
,
process_instance_priority
int
(
11
)
DEFAULT
NULL
,
process_instance_priority
int
(
11
)
DEFAULT
'2'
,
worker_group
varchar
(
64
)
DEFAULT
''
,
environment_code
bigint
(
20
)
DEFAULT
'-1'
,
create_time
datetime
NOT
NULL
,
...
...
dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_mysql.sql
浏览文件 @
2862f5b6
...
...
@@ -339,7 +339,7 @@ CREATE TABLE `t_ds_command` (
`start_time`
datetime
DEFAULT
NULL
COMMENT
'start time'
,
`executor_id`
int
(
11
)
DEFAULT
NULL
COMMENT
'executor id'
,
`update_time`
datetime
DEFAULT
NULL
COMMENT
'update time'
,
`process_instance_priority`
int
(
11
)
DEFAULT
NULL
COMMENT
'process instance priority: 0 Highest,1 High,2 Medium,3 Low,4 Lowest'
,
`process_instance_priority`
int
(
11
)
DEFAULT
'2'
COMMENT
'process instance priority: 0 Highest,1 High,2 Medium,3 Low,4 Lowest'
,
`worker_group`
varchar
(
64
)
COMMENT
'worker group'
,
`environment_code`
bigint
(
20
)
DEFAULT
'-1'
COMMENT
'environment code'
,
`dry_run`
tinyint
(
4
)
DEFAULT
'0'
COMMENT
'dry run flag:0 normal, 1 dry run'
,
...
...
@@ -391,7 +391,7 @@ CREATE TABLE `t_ds_error_command` (
`schedule_time`
datetime
DEFAULT
NULL
COMMENT
'scheduler time'
,
`start_time`
datetime
DEFAULT
NULL
COMMENT
'start time'
,
`update_time`
datetime
DEFAULT
NULL
COMMENT
'update time'
,
`process_instance_priority`
int
(
11
)
DEFAULT
NULL
COMMENT
'process instance priority, 0 Highest,1 High,2 Medium,3 Low,4 Lowest'
,
`process_instance_priority`
int
(
11
)
DEFAULT
'2'
COMMENT
'process instance priority, 0 Highest,1 High,2 Medium,3 Low,4 Lowest'
,
`worker_group`
varchar
(
64
)
COMMENT
'worker group'
,
`environment_code`
bigint
(
20
)
DEFAULT
'-1'
COMMENT
'environment code'
,
`message`
text
COMMENT
'message'
,
...
...
@@ -476,7 +476,7 @@ CREATE TABLE `t_ds_task_definition` (
`task_execute_type`
int
(
11
)
DEFAULT
'0'
COMMENT
'task execute type: 0-batch, 1-stream'
,
`task_params`
longtext
COMMENT
'job custom parameters'
,
`flag`
tinyint
(
2
)
DEFAULT
NULL
COMMENT
'0 not available, 1 available'
,
`task_priority`
tinyint
(
4
)
DEFAULT
NULL
COMMENT
'job priority'
,
`task_priority`
tinyint
(
4
)
DEFAULT
'2'
COMMENT
'job priority'
,
`worker_group`
varchar
(
200
)
DEFAULT
NULL
COMMENT
'worker grouping'
,
`environment_code`
bigint
(
20
)
DEFAULT
'-1'
COMMENT
'environment code'
,
`fail_retry_times`
int
(
11
)
DEFAULT
NULL
COMMENT
'number of failed retries'
,
...
...
@@ -511,7 +511,7 @@ CREATE TABLE `t_ds_task_definition_log` (
`task_execute_type`
int
(
11
)
DEFAULT
'0'
COMMENT
'task execute type: 0-batch, 1-stream'
,
`task_params`
longtext
COMMENT
'job custom parameters'
,
`flag`
tinyint
(
2
)
DEFAULT
NULL
COMMENT
'0 not available, 1 available'
,
`task_priority`
tinyint
(
4
)
DEFAULT
NULL
COMMENT
'job priority'
,
`task_priority`
tinyint
(
4
)
DEFAULT
'2'
COMMENT
'job priority'
,
`worker_group`
varchar
(
200
)
DEFAULT
NULL
COMMENT
'worker grouping'
,
`environment_code`
bigint
(
20
)
DEFAULT
'-1'
COMMENT
'environment code'
,
`fail_retry_times`
int
(
11
)
DEFAULT
NULL
COMMENT
'number of failed retries'
,
...
...
@@ -612,7 +612,7 @@ CREATE TABLE `t_ds_process_instance` (
`is_sub_process`
int
(
11
)
DEFAULT
'0'
COMMENT
'flag, whether the process is sub process'
,
`executor_id`
int
(
11
)
NOT
NULL
COMMENT
'executor id'
,
`history_cmd`
text
COMMENT
'history commands of process instance operation'
,
`process_instance_priority`
int
(
11
)
DEFAULT
NULL
COMMENT
'process instance priority. 0 Highest,1 High,2 Medium,3 Low,4 Lowest'
,
`process_instance_priority`
int
(
11
)
DEFAULT
'2'
COMMENT
'process instance priority. 0 Highest,1 High,2 Medium,3 Low,4 Lowest'
,
`worker_group`
varchar
(
64
)
DEFAULT
NULL
COMMENT
'worker group id'
,
`environment_code`
bigint
(
20
)
DEFAULT
'-1'
COMMENT
'environment code'
,
`timeout`
int
(
11
)
DEFAULT
'0'
COMMENT
'time out'
,
...
...
@@ -800,7 +800,7 @@ CREATE TABLE `t_ds_schedules` (
`release_state`
tinyint
(
4
)
NOT
NULL
COMMENT
'release state. 0:offline,1:online '
,
`warning_type`
tinyint
(
4
)
NOT
NULL
COMMENT
'Alarm type: 0 is not sent, 1 process is sent successfully, 2 process is sent failed, 3 process is sent successfully and all failures are sent'
,
`warning_group_id`
int
(
11
)
DEFAULT
NULL
COMMENT
'alert group id'
,
`process_instance_priority`
int
(
11
)
DEFAULT
NULL
COMMENT
'process instance priority:0 Highest,1 High,2 Medium,3 Low,4 Lowest'
,
`process_instance_priority`
int
(
11
)
DEFAULT
'2'
COMMENT
'process instance priority:0 Highest,1 High,2 Medium,3 Low,4 Lowest'
,
`worker_group`
varchar
(
64
)
DEFAULT
''
COMMENT
'worker group id'
,
`environment_code`
bigint
(
20
)
DEFAULT
'-1'
COMMENT
'environment code'
,
`create_time`
datetime
NOT
NULL
COMMENT
'create time'
,
...
...
dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_postgresql.sql
浏览文件 @
2862f5b6
...
...
@@ -262,7 +262,7 @@ CREATE TABLE t_ds_command (
start_time
timestamp
DEFAULT
NULL
,
executor_id
int
DEFAULT
NULL
,
update_time
timestamp
DEFAULT
NULL
,
process_instance_priority
int
DEFAULT
NULL
,
process_instance_priority
int
DEFAULT
'2'
,
worker_group
varchar
(
64
),
environment_code
bigint
DEFAULT
'-1'
,
dry_run
int
DEFAULT
'0'
,
...
...
@@ -309,7 +309,7 @@ CREATE TABLE t_ds_error_command (
start_time
timestamp
DEFAULT
NULL
,
executor_id
int
DEFAULT
NULL
,
update_time
timestamp
DEFAULT
NULL
,
process_instance_priority
int
DEFAULT
NULL
,
process_instance_priority
int
DEFAULT
'2'
,
worker_group
varchar
(
64
),
environment_code
bigint
DEFAULT
'-1'
,
dry_run
int
DEFAULT
'0'
,
...
...
@@ -393,7 +393,7 @@ CREATE TABLE t_ds_task_definition (
task_execute_type
int
DEFAULT
'0'
,
task_params
text
,
flag
int
DEFAULT
NULL
,
task_priority
int
DEFAULT
NULL
,
task_priority
int
DEFAULT
'2'
,
worker_group
varchar
(
255
)
DEFAULT
NULL
,
environment_code
bigint
DEFAULT
'-1'
,
fail_retry_times
int
DEFAULT
NULL
,
...
...
@@ -431,7 +431,7 @@ CREATE TABLE t_ds_task_definition_log (
task_execute_type
int
(
11
)
DEFAULT
'0'
,
task_params
text
,
flag
int
DEFAULT
NULL
,
task_priority
int
DEFAULT
NULL
,
task_priority
int
DEFAULT
'2'
,
worker_group
varchar
(
255
)
DEFAULT
NULL
,
environment_code
bigint
DEFAULT
'-1'
,
fail_retry_times
int
DEFAULT
NULL
,
...
...
@@ -540,7 +540,7 @@ CREATE TABLE t_ds_process_instance (
executor_id
int
NOT
NULL
,
history_cmd
text
,
dependence_schedule_times
text
,
process_instance_priority
int
DEFAULT
NULL
,
process_instance_priority
int
DEFAULT
'2'
,
worker_group
varchar
(
64
)
,
environment_code
bigint
DEFAULT
'-1'
,
timeout
int
DEFAULT
'0'
,
...
...
@@ -711,7 +711,7 @@ CREATE TABLE t_ds_schedules (
release_state
int
NOT
NULL
,
warning_type
int
NOT
NULL
,
warning_group_id
int
DEFAULT
NULL
,
process_instance_priority
int
DEFAULT
NULL
,
process_instance_priority
int
DEFAULT
'2'
,
worker_group
varchar
(
64
),
environment_code
bigint
DEFAULT
'-1'
,
create_time
timestamp
NOT
NULL
,
...
...
dolphinscheduler-dao/src/main/resources/sql/upgrade/3.1.0_schema/mysql/dolphinscheduler_ddl.sql
浏览文件 @
2862f5b6
...
...
@@ -390,3 +390,11 @@ d//
delimiter
;
CALL
modify_t_ds_task_group_col_description
;
DROP
PROCEDURE
modify_t_ds_task_group_col_description
;
alter
table
t_ds_process_instance
alter
column
process_instance_priority
set
default
2
;
alter
table
t_ds_schedules
alter
column
process_instance_priority
set
default
2
;
alter
table
t_ds_command
alter
column
process_instance_priority
set
default
2
;
alter
table
t_ds_error_command
alter
column
process_instance_priority
set
default
2
;
alter
table
t_ds_task_definition_log
alter
column
task_priority
set
default
2
;
alter
table
t_ds_task_definition
alter
column
task_priority
set
default
2
;
dolphinscheduler-dao/src/main/resources/sql/upgrade/3.1.0_schema/postgresql/dolphinscheduler_ddl.sql
浏览文件 @
2862f5b6
...
...
@@ -57,6 +57,14 @@ CREATE TABLE IF NOT EXISTS "t_ds_cluster" (
CONSTRAINT
cluster_code_unique
UNIQUE
(
code
)
);
--- set process_instance_priority and task_priority default value as 2
alter
table
t_ds_process_instance
alter
column
process_instance_priority
set
default
2
;
alter
table
t_ds_schedules
alter
column
process_instance_priority
set
default
2
;
alter
table
t_ds_command
alter
column
process_instance_priority
set
default
2
;
alter
table
t_ds_error_command
alter
column
process_instance_priority
set
default
2
;
alter
table
t_ds_task_definition_log
alter
column
task_priority
set
default
2
;
alter
table
t_ds_task_definition
alter
column
task_priority
set
default
2
;
--- add column
ALTER
TABLE
t_ds_task_definition
ADD
COLUMN
IF
NOT
EXISTS
task_execute_type
int
DEFAULT
'0'
;
ALTER
TABLE
t_ds_task_definition_log
ADD
COLUMN
IF
NOT
EXISTS
task_execute_type
int
DEFAULT
'0'
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录