Browse Source

[Bug][sql] fix mysql create sentence bug (#6148)

* fix mysql error.
2.0.7-release
Kerwin 3 years ago committed by GitHub
parent
commit
bcb1ccba6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/task/CommonTaskProcessor.java
  2. 2
      dolphinscheduler-server/src/main/resources/worker.properties
  3. 2
      sql/dolphinscheduler_postgre.sql
  4. 2
      sql/upgrade/1.4.0_schema/mysql/dolphinscheduler_ddl.sql
  5. 2
      sql/upgrade/1.4.0_schema/postgresql/dolphinscheduler_ddl.sql

3
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/task/CommonTaskProcessor.java

@ -20,6 +20,7 @@ package org.apache.dolphinscheduler.server.master.runner.task;
import org.apache.dolphinscheduler.common.Constants;
import org.apache.dolphinscheduler.common.enums.ExecutionStatus;
import org.apache.dolphinscheduler.common.utils.JSONUtils;
import org.apache.dolphinscheduler.common.utils.StringUtils;
import org.apache.dolphinscheduler.dao.entity.ProcessInstance;
import org.apache.dolphinscheduler.dao.entity.TaskInstance;
import org.apache.dolphinscheduler.remote.command.TaskKillRequestCommand;
@ -147,7 +148,7 @@ public class CommonTaskProcessor extends BaseTaskProcessor {
if (taskInstance.getState().typeIsFinished()) {
return true;
}
if (null == taskInstance.getHost() || taskInstance.getHost().isEmpty()) {
if (StringUtils.isBlank(taskInstance.getHost())) {
taskInstance.setState(ExecutionStatus.KILL);
taskInstance.setEndTime(new Date());
processService.updateTaskInstance(taskInstance);

2
dolphinscheduler-server/src/main/resources/worker.properties

@ -42,7 +42,7 @@
# alert server listen host
#alert.listen.host=localhost
#alert.plugin.dir config the Alert Plugin dir . AlertServer while find and load the Alert Plugin Jar from this dir when deploy and start AlertServer on the server .
#task.plugin.dir config the #task.plugin.dir config the Task Plugin dir . WorkerServer while find and load the Task Plugin Jar from this dir when deploy and start WorkerServer on the server .
#task.plugin.dir=lib/plugin/task
#maven.local.repository=/Users/localRepository

2
sql/dolphinscheduler_postgre.sql

@ -675,7 +675,7 @@ CREATE TABLE t_ds_task_instance (
task_instance_priority int DEFAULT NULL ,
worker_group varchar(64),
environment_code bigint DEFAULT NULL,
environment_config text DEFAULT '',
environment_config text,
executor_id int DEFAULT NULL ,
first_submit_time timestamp DEFAULT NULL ,
delay_time int DEFAULT '0' ,

2
sql/upgrade/1.4.0_schema/mysql/dolphinscheduler_ddl.sql

@ -363,7 +363,7 @@ ALTER TABLE t_ds_error_command ADD COLUMN `environment_code` bigint(20) default
ALTER TABLE t_ds_schedules ADD COLUMN `environment_code` bigint(20) default NULL COMMENT 'environment code' AFTER `worker_group`;
ALTER TABLE t_ds_process_instance ADD COLUMN `environment_code` bigint(20) default NULL COMMENT 'environment code' AFTER `worker_group`;
ALTER TABLE t_ds_task_instance ADD COLUMN `environment_code` bigint(20) default NULL COMMENT 'environment code' AFTER `worker_group`;
ALTER TABLE t_ds_task_instance ADD COLUMN `environment_config` text default '' COMMENT 'environment config' AFTER `environment_code`;
ALTER TABLE t_ds_task_instance ADD COLUMN `environment_config` text COMMENT 'environment config' AFTER `environment_code`;
-- ----------------------------
-- Table structure for t_ds_environment_worker_group_relation

2
sql/upgrade/1.4.0_schema/postgresql/dolphinscheduler_ddl.sql

@ -361,7 +361,7 @@ comment on column t_ds_process_instance.environment_code is 'environment code';
ALTER TABLE t_ds_task_instance ADD COLUMN environment_code bigint DEFAULT NULL;
comment on column t_ds_task_instance.environment_code is 'environment code';
ALTER TABLE t_ds_task_instance ADD COLUMN environment_config text DEFAULT '';
ALTER TABLE t_ds_task_instance ADD COLUMN environment_config text;
comment on column t_ds_task_instance.environment_config is 'environment config';
--

Loading…
Cancel
Save