Skip to content

Commit 2db8098

Browse files
authored
[DSIP-56] Refactor JDBC registry support session timeout and data change event (apache#16287)
* Support sessionTimeout in jdbc registry * Add registry table to initialize sql
1 parent 761323f commit 2db8098

File tree

70 files changed

+2881
-1198
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+2881
-1198
lines changed

Diff for: .github/workflows/cluster-test/mysql_with_mysql_registry/deploy.sh

-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ service ssh start
3535

3636
#Init schema
3737
/bin/bash $DOLPHINSCHEDULER_HOME/tools/bin/upgrade-schema.sh
38-
/bin/bash $DOLPHINSCHEDULER_HOME/tools/bin/initialize-jdbc-registry.sh
3938

4039
#Start Cluster
4140
/bin/bash $DOLPHINSCHEDULER_HOME/bin/start-all.sh

Diff for: .github/workflows/cluster-test/mysql_with_mysql_registry/dolphinscheduler_env.sh

+6-2
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,12 @@ export DATAX_LAUNCHER=${DATAX_LAUNCHER:-/opt/soft/datax/bin/datax.py}
4646

4747
export PATH=$HADOOP_HOME/bin:$SPARK_HOME/bin:$PYTHON_LAUNCHER:$JAVA_HOME/bin:$HIVE_HOME/bin:$FLINK_HOME/bin:$DATAX_LAUNCHER:$PATH
4848

49-
export MASTER_RESERVED_MEMORY=0.01
50-
export WORKER_RESERVED_MEMORY=0.01
49+
export MASTER_SERVER_LOAD_PROTECTION_MAX_SYSTEM_CPU_USAGE_PERCENTAGE_THRESHOLDS=0.7
50+
export MASTER_SERVER_LOAD_PROTECTION_MAX_JVM_CPU_USAGE_PERCENTAGE_THRESHOLDS=0.7
51+
export MASTER_SERVER_LOAD_PROTECTION_MAX_SYSTEM_MEMORY_USAGE_PERCENTAGE_THRESHOLDS=0.7
52+
export WORKER_SERVER_LOAD_PROTECTION_MAX_SYSTEM_CPU_USAGE_PERCENTAGE_THRESHOLDS=0.7
53+
export WORKER_SERVER_LOAD_PROTECTION_MAX_JVM_CPU_USAGE_PERCENTAGE_THRESHOLDS=0.7
54+
export WORKER_SERVER_LOAD_PROTECTION_MAX_SYSTEM_MEMORY_USAGE_PERCENTAGE_THRESHOLDS=0.7
5155

5256
# applicationId auto collection related configuration, the following configurations are unnecessary if setting appId.collect=log
5357
#export HADOOP_CLASSPATH=`hadoop classpath`:${DOLPHINSCHEDULER_HOME}/tools/libs/*

Diff for: .github/workflows/cluster-test/mysql_with_zookeeper_registry/dolphinscheduler_env.sh

+6-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,12 @@ export DATAX_LAUNCHER=${DATAX_LAUNCHER:-/opt/soft/datax/bin/datax.py}
4545

4646
export PATH=$HADOOP_HOME/bin:$SPARK_HOME/bin:$PYTHON_LAUNCHER:$JAVA_HOME/bin:$HIVE_HOME/bin:$FLINK_HOME/bin:$DATAX_LAUNCHER:$PATH
4747

48-
export MASTER_RESERVED_MEMORY=0.01
49-
export WORKER_RESERVED_MEMORY=0.01
48+
export MASTER_SERVER_LOAD_PROTECTION_MAX_SYSTEM_CPU_USAGE_PERCENTAGE_THRESHOLDS=0.7
49+
export MASTER_SERVER_LOAD_PROTECTION_MAX_JVM_CPU_USAGE_PERCENTAGE_THRESHOLDS=0.7
50+
export MASTER_SERVER_LOAD_PROTECTION_MAX_SYSTEM_MEMORY_USAGE_PERCENTAGE_THRESHOLDS=0.7
51+
export WORKER_SERVER_LOAD_PROTECTION_MAX_SYSTEM_CPU_USAGE_PERCENTAGE_THRESHOLDS=0.7
52+
export WORKER_SERVER_LOAD_PROTECTION_MAX_JVM_CPU_USAGE_PERCENTAGE_THRESHOLDS=0.7
53+
export WORKER_SERVER_LOAD_PROTECTION_MAX_SYSTEM_MEMORY_USAGE_PERCENTAGE_THRESHOLDS=0.7
5054

5155
# applicationId auto collection related configuration, the following configurations are unnecessary if setting appId.collect=log
5256
#export HADOOP_CLASSPATH=`hadoop classpath`:${DOLPHINSCHEDULER_HOME}/tools/libs/*

Diff for: .github/workflows/cluster-test/postgresql_with_postgresql_registry/deploy.sh

-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ service ssh start
3232

3333
#Init schema
3434
/bin/bash $DOLPHINSCHEDULER_HOME/tools/bin/upgrade-schema.sh
35-
/bin/bash $DOLPHINSCHEDULER_HOME/tools/bin/initialize-jdbc-registry.sh
3635

3736
#Start Cluster
3837
/bin/bash $DOLPHINSCHEDULER_HOME/bin/start-all.sh

Diff for: .github/workflows/cluster-test/postgresql_with_postgresql_registry/dolphinscheduler_env.sh

+6-2
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,12 @@ export DATAX_LAUNCHER=${DATAX_LAUNCHER:-/opt/soft/datax/bin/datax.py}
4646

4747
export PATH=$HADOOP_HOME/bin:$SPARK_HOME/bin:$PYTHON_LAUNCHER:$JAVA_HOME/bin:$HIVE_HOME/bin:$FLINK_HOME/bin:$DATAX_LAUNCHER:$PATH
4848

49-
export MASTER_RESERVED_MEMORY=0.01
50-
export WORKER_RESERVED_MEMORY=0.01
49+
export MASTER_SERVER_LOAD_PROTECTION_MAX_SYSTEM_CPU_USAGE_PERCENTAGE_THRESHOLDS=0.7
50+
export MASTER_SERVER_LOAD_PROTECTION_MAX_JVM_CPU_USAGE_PERCENTAGE_THRESHOLDS=0.7
51+
export MASTER_SERVER_LOAD_PROTECTION_MAX_SYSTEM_MEMORY_USAGE_PERCENTAGE_THRESHOLDS=0.7
52+
export WORKER_SERVER_LOAD_PROTECTION_MAX_SYSTEM_CPU_USAGE_PERCENTAGE_THRESHOLDS=0.7
53+
export WORKER_SERVER_LOAD_PROTECTION_MAX_JVM_CPU_USAGE_PERCENTAGE_THRESHOLDS=0.7
54+
export WORKER_SERVER_LOAD_PROTECTION_MAX_SYSTEM_MEMORY_USAGE_PERCENTAGE_THRESHOLDS=0.7
5155

5256
# applicationId auto collection related configuration, the following configurations are unnecessary if setting appId.collect=log
5357
#export HADOOP_CLASSPATH=`hadoop classpath`:${DOLPHINSCHEDULER_HOME}/tools/libs/*

Diff for: .github/workflows/cluster-test/postgresql_with_zookeeper_registry/dolphinscheduler_env.sh

+6-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,12 @@ export DATAX_LAUNCHER=${DATAX_LAUNCHER:-/opt/soft/datax/bin/datax.py}
4545

4646
export PATH=$HADOOP_HOME/bin:$SPARK_HOME/bin:$PYTHON_LAUNCHER:$JAVA_HOME/bin:$HIVE_HOME/bin:$FLINK_HOME/bin:$DATAX_LAUNCHER:$PATH
4747

48-
export MASTER_RESERVED_MEMORY=0.01
49-
export WORKER_RESERVED_MEMORY=0.01
48+
export MASTER_SERVER_LOAD_PROTECTION_MAX_SYSTEM_CPU_USAGE_PERCENTAGE_THRESHOLDS=0.7
49+
export MASTER_SERVER_LOAD_PROTECTION_MAX_JVM_CPU_USAGE_PERCENTAGE_THRESHOLDS=0.7
50+
export MASTER_SERVER_LOAD_PROTECTION_MAX_SYSTEM_MEMORY_USAGE_PERCENTAGE_THRESHOLDS=0.7
51+
export WORKER_SERVER_LOAD_PROTECTION_MAX_SYSTEM_CPU_USAGE_PERCENTAGE_THRESHOLDS=0.7
52+
export WORKER_SERVER_LOAD_PROTECTION_MAX_JVM_CPU_USAGE_PERCENTAGE_THRESHOLDS=0.7
53+
export WORKER_SERVER_LOAD_PROTECTION_MAX_SYSTEM_MEMORY_USAGE_PERCENTAGE_THRESHOLDS=0.7
5054

5155
# applicationId auto collection related configuration, the following configurations are unnecessary if setting appId.collect=log
5256
#export HADOOP_CLASSPATH=`hadoop classpath`:${DOLPHINSCHEDULER_HOME}/tools/libs/*

Diff for: dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/thread/ThreadUtils.java

+4
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ public static ScheduledExecutorService newSingleDaemonScheduledExecutorService(S
3939
return Executors.newSingleThreadScheduledExecutor(newDaemonThreadFactory(threadName));
4040
}
4141

42+
public static ScheduledExecutorService newDaemonScheduledExecutorService(String threadName, int threadsNum) {
43+
return Executors.newScheduledThreadPool(threadsNum, newDaemonThreadFactory(threadName));
44+
}
45+
4246
public static ThreadFactory newDaemonThreadFactory(String threadName) {
4347
return new ThreadFactoryBuilder()
4448
.setDaemon(true)

Diff for: dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_h2.sql

+61
Original file line numberDiff line numberDiff line change
@@ -2207,3 +2207,64 @@ CREATE TABLE t_ds_process_task_lineage
22072207
KEY `idx_task_code_version` (`task_definition_code`,`task_definition_version`),
22082208
KEY `idx_dept_code` (`dept_project_code`,`dept_process_definition_code`,`dept_task_definition_code`)
22092209
);
2210+
2211+
2212+
-- ----------------------------
2213+
-- Table structure for jdbc registry
2214+
-- ----------------------------
2215+
2216+
DROP TABLE IF EXISTS `t_ds_jdbc_registry_data`;
2217+
CREATE TABLE `t_ds_jdbc_registry_data`
2218+
(
2219+
`id` bigint(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key',
2220+
`data_key` varchar(256) NOT NULL COMMENT 'key, like zookeeper node path',
2221+
`data_value` text NOT NULL COMMENT 'data, like zookeeper node value',
2222+
`data_type` varchar(64) NOT NULL COMMENT 'EPHEMERAL, PERSISTENT',
2223+
`client_id` bigint NOT NULL COMMENT 'client id',
2224+
`create_time` timestamp NOT NULL default current_timestamp COMMENT 'create time',
2225+
`last_update_time` timestamp NOT NULL default current_timestamp COMMENT 'last update time',
2226+
PRIMARY KEY (`id`),
2227+
unique KEY `uk_t_ds_jdbc_registry_dataKey`(`data_key`)
2228+
) ENGINE = InnoDB
2229+
DEFAULT CHARSET = utf8;
2230+
2231+
2232+
DROP TABLE IF EXISTS `t_ds_jdbc_registry_lock`;
2233+
CREATE TABLE `t_ds_jdbc_registry_lock`
2234+
(
2235+
`id` bigint(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key',
2236+
`lock_key` varchar(256) NOT NULL COMMENT 'lock path',
2237+
`lock_owner` varchar(256) NOT NULL COMMENT 'the lock owner, ip_processId',
2238+
`client_id` bigint NOT NULL COMMENT 'client id',
2239+
`create_time` timestamp NOT NULL default current_timestamp COMMENT 'create time',
2240+
PRIMARY KEY (`id`),
2241+
unique KEY `uk_t_ds_jdbc_registry_lockKey`(`lock_key`)
2242+
) ENGINE = InnoDB
2243+
DEFAULT CHARSET = utf8;
2244+
2245+
DROP TABLE IF EXISTS `t_ds_jdbc_registry_client_heartbeat`;
2246+
CREATE TABLE `t_ds_jdbc_registry_client_heartbeat`
2247+
(
2248+
`id` bigint(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key',
2249+
`client_name` varchar(256) NOT NULL COMMENT 'client name, ip_processId',
2250+
`last_heartbeat_time` bigint NOT NULL COMMENT 'last heartbeat timestamp',
2251+
`connection_config` text NOT NULL COMMENT 'connection config',
2252+
`create_time` timestamp NOT NULL default current_timestamp COMMENT 'create time',
2253+
PRIMARY KEY (`id`)
2254+
) ENGINE = InnoDB
2255+
DEFAULT CHARSET = utf8;
2256+
2257+
DROP TABLE IF EXISTS `t_ds_jdbc_registry_data_change_event`;
2258+
CREATE TABLE `t_ds_jdbc_registry_data_change_event`
2259+
(
2260+
`id` bigint(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key',
2261+
`event_type` varchar(64) NOT NULL COMMENT 'ADD, UPDATE, DELETE',
2262+
`jdbc_registry_data` text NOT NULL COMMENT 'jdbc registry data',
2263+
`create_time` timestamp NOT NULL default current_timestamp COMMENT 'create time',
2264+
PRIMARY KEY (`id`)
2265+
) ENGINE = InnoDB
2266+
DEFAULT CHARSET = utf8;
2267+
2268+
-- ----------------------------
2269+
-- Table structure for jdbc registry
2270+
-- ----------------------------

Diff for: dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_mysql.sql

+52
Original file line numberDiff line numberDiff line change
@@ -2178,3 +2178,55 @@ CREATE TABLE `t_ds_process_task_lineage` (
21782178
KEY `idx_task_code_version` (`task_definition_code`,`task_definition_version`),
21792179
KEY `idx_dept_code` (`dept_project_code`,`dept_process_definition_code`,`dept_task_definition_code`)
21802180
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
2181+
2182+
DROP TABLE IF EXISTS `t_ds_jdbc_registry_data`;
2183+
CREATE TABLE `t_ds_jdbc_registry_data`
2184+
(
2185+
`id` bigint(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key',
2186+
`data_key` varchar(256) NOT NULL COMMENT 'key, like zookeeper node path',
2187+
`data_value` text NOT NULL COMMENT 'data, like zookeeper node value',
2188+
`data_type` varchar(64) NOT NULL COMMENT 'EPHEMERAL, PERSISTENT',
2189+
`client_id` bigint(11) NOT NULL COMMENT 'client id',
2190+
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'create time',
2191+
`last_update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'last update time',
2192+
PRIMARY KEY (`id`),
2193+
unique Key `uk_t_ds_jdbc_registry_dataKey` (`data_key`)
2194+
) ENGINE = InnoDB
2195+
DEFAULT CHARSET = utf8;
2196+
2197+
2198+
DROP TABLE IF EXISTS `t_ds_jdbc_registry_lock`;
2199+
CREATE TABLE `t_ds_jdbc_registry_lock`
2200+
(
2201+
`id` bigint(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key',
2202+
`lock_key` varchar(256) NOT NULL COMMENT 'lock path',
2203+
`lock_owner` varchar(256) NOT NULL COMMENT 'the lock owner, ip_processId',
2204+
`client_id` bigint(11) NOT NULL COMMENT 'client id',
2205+
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'create time',
2206+
PRIMARY KEY (`id`),
2207+
unique Key `uk_t_ds_jdbc_registry_lockKey` (`lock_key`)
2208+
) ENGINE = InnoDB
2209+
DEFAULT CHARSET = utf8;
2210+
2211+
DROP TABLE IF EXISTS `t_ds_jdbc_registry_client_heartbeat`;
2212+
CREATE TABLE `t_ds_jdbc_registry_client_heartbeat`
2213+
(
2214+
`id` bigint(11) NOT NULL COMMENT 'primary key',
2215+
`client_name` varchar(256) NOT NULL COMMENT 'client name, ip_processId',
2216+
`last_heartbeat_time` bigint(11) NOT NULL COMMENT 'last heartbeat timestamp',
2217+
`connection_config` text NOT NULL COMMENT 'connection config',
2218+
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'create time',
2219+
PRIMARY KEY (`id`)
2220+
) ENGINE = InnoDB
2221+
DEFAULT CHARSET = utf8;
2222+
2223+
DROP TABLE IF EXISTS `t_ds_jdbc_registry_data_change_event`;
2224+
CREATE TABLE `t_ds_jdbc_registry_data_change_event`
2225+
(
2226+
`id` bigint(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key',
2227+
`event_type` varchar(64) NOT NULL COMMENT 'ADD, UPDATE, DELETE',
2228+
`jdbc_registry_data` text NOT NULL COMMENT 'jdbc registry data',
2229+
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'create time',
2230+
PRIMARY KEY (`id`)
2231+
) ENGINE = InnoDB
2232+
DEFAULT CHARSET = utf8;

Diff for: dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_postgresql.sql

+49
Original file line numberDiff line numberDiff line change
@@ -2171,3 +2171,52 @@ CREATE TABLE t_ds_process_task_lineage (
21712171
create index idx_process_code_version on t_ds_process_task_lineage (process_definition_code,process_definition_version);
21722172
create index idx_task_code_version on t_ds_process_task_lineage (task_definition_code,task_definition_version);
21732173
create index idx_dept_code on t_ds_process_task_lineage (dept_project_code,dept_process_definition_code,dept_task_definition_code);
2174+
2175+
DROP TABLE IF EXISTS t_ds_jdbc_registry_data;
2176+
create table t_ds_jdbc_registry_data
2177+
(
2178+
id bigserial not null,
2179+
data_key varchar not null,
2180+
data_value text not null,
2181+
data_type varchar not null,
2182+
client_id bigint not null,
2183+
create_time timestamp not null default current_timestamp,
2184+
last_update_time timestamp not null default current_timestamp,
2185+
primary key (id)
2186+
);
2187+
create unique index uk_t_ds_jdbc_registry_dataKey on t_ds_jdbc_registry_data (data_key);
2188+
2189+
2190+
DROP TABLE IF EXISTS t_ds_jdbc_registry_lock;
2191+
create table t_ds_jdbc_registry_lock
2192+
(
2193+
id bigserial not null,
2194+
lock_key varchar not null,
2195+
lock_owner varchar not null,
2196+
client_id bigint not null,
2197+
create_time timestamp not null default current_timestamp,
2198+
primary key (id)
2199+
);
2200+
create unique index uk_t_ds_jdbc_registry_lockKey on t_ds_jdbc_registry_lock (lock_key);
2201+
2202+
2203+
DROP TABLE IF EXISTS t_ds_jdbc_registry_client_heartbeat;
2204+
create table t_ds_jdbc_registry_client_heartbeat
2205+
(
2206+
id bigint not null,
2207+
client_name varchar not null,
2208+
last_heartbeat_time bigint not null,
2209+
connection_config text not null,
2210+
create_time timestamp not null default current_timestamp,
2211+
primary key (id)
2212+
);
2213+
2214+
DROP TABLE IF EXISTS t_ds_jdbc_registry_data_change_event;
2215+
create table t_ds_jdbc_registry_data_change_event
2216+
(
2217+
id bigserial not null,
2218+
event_type varchar not null,
2219+
jdbc_registry_data text not null,
2220+
create_time timestamp not null default current_timestamp,
2221+
primary key (id)
2222+
);

Diff for: dolphinscheduler-dao/src/main/resources/sql/upgrade/3.3.0_schema/mysql/dolphinscheduler_ddl.sql

+52
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,55 @@ CREATE TABLE `t_ds_process_task_lineage`
3333
KEY `idx_task_code_version` (`task_definition_code`,`task_definition_version`),
3434
KEY `idx_dept_code` (`dept_project_code`,`dept_process_definition_code`,`dept_task_definition_code`)
3535
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
36+
37+
DROP TABLE IF EXISTS `t_ds_jdbc_registry_data`;
38+
CREATE TABLE `t_ds_jdbc_registry_data`
39+
(
40+
`id` bigint(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key',
41+
`data_key` varchar(256) NOT NULL COMMENT 'key, like zookeeper node path',
42+
`data_value` text NOT NULL COMMENT 'data, like zookeeper node value',
43+
`data_type` varchar(64) NOT NULL COMMENT 'EPHEMERAL, PERSISTENT',
44+
`client_id` bigint(11) NOT NULL COMMENT 'client id',
45+
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'create time',
46+
`last_update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'last update time',
47+
PRIMARY KEY (`id`),
48+
unique Key `uk_t_ds_jdbc_registry_dataKey` (`data_key`)
49+
) ENGINE = InnoDB
50+
DEFAULT CHARSET = utf8;
51+
52+
53+
DROP TABLE IF EXISTS `t_ds_jdbc_registry_lock`;
54+
CREATE TABLE `t_ds_jdbc_registry_lock`
55+
(
56+
`id` bigint(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key',
57+
`lock_key` varchar(256) NOT NULL COMMENT 'lock path',
58+
`lock_owner` varchar(256) NOT NULL COMMENT 'the lock owner, ip_processId',
59+
`client_id` bigint(11) NOT NULL COMMENT 'client id',
60+
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'create time',
61+
PRIMARY KEY (`id`),
62+
unique Key `uk_t_ds_jdbc_registry_lockKey` (`lock_key`)
63+
) ENGINE = InnoDB
64+
DEFAULT CHARSET = utf8;
65+
66+
DROP TABLE IF EXISTS `t_ds_jdbc_registry_client_heartbeat`;
67+
CREATE TABLE `t_ds_jdbc_registry_client_heartbeat`
68+
(
69+
`id` bigint(11) NOT NULL COMMENT 'primary key',
70+
`client_name` varchar(256) NOT NULL COMMENT 'client name, ip_processId',
71+
`last_heartbeat_time` bigint(11) NOT NULL COMMENT 'last heartbeat timestamp',
72+
`connection_config` text NOT NULL COMMENT 'connection config',
73+
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'create time',
74+
PRIMARY KEY (`id`)
75+
) ENGINE = InnoDB
76+
DEFAULT CHARSET = utf8;
77+
78+
DROP TABLE IF EXISTS `t_ds_jdbc_registry_data_change_event`;
79+
CREATE TABLE `t_ds_jdbc_registry_data_change_event`
80+
(
81+
`id` bigint(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key',
82+
`event_type` varchar(64) NOT NULL COMMENT 'ADD, UPDATE, DELETE',
83+
`jdbc_registry_data` text NOT NULL COMMENT 'jdbc registry data',
84+
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'create time',
85+
PRIMARY KEY (`id`)
86+
) ENGINE = InnoDB
87+
DEFAULT CHARSET = utf8;

Diff for: dolphinscheduler-dao/src/main/resources/sql/upgrade/3.3.0_schema/postgresql/dolphinscheduler_ddl.sql

+49
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,52 @@ CREATE TABLE t_ds_process_task_lineage (
3333
create index idx_process_code_version on t_ds_process_task_lineage (process_definition_code,process_definition_version);
3434
create index idx_task_code_version on t_ds_process_task_lineage (task_definition_code,task_definition_version);
3535
create index idx_dept_code on t_ds_process_task_lineage (dept_project_code,dept_process_definition_code,dept_task_definition_code);
36+
37+
DROP TABLE IF EXISTS t_ds_jdbc_registry_data;
38+
create table t_ds_jdbc_registry_data
39+
(
40+
id bigserial not null,
41+
data_key varchar not null,
42+
data_value text not null,
43+
data_type varchar not null,
44+
client_id bigint not null,
45+
create_time timestamp not null default current_timestamp,
46+
last_update_time timestamp not null default current_timestamp,
47+
primary key (id)
48+
);
49+
create unique index uk_t_ds_jdbc_registry_dataKey on t_ds_jdbc_registry_data (data_key);
50+
51+
52+
DROP TABLE IF EXISTS t_ds_jdbc_registry_lock;
53+
create table t_ds_jdbc_registry_lock
54+
(
55+
id bigserial not null,
56+
lock_key varchar not null,
57+
lock_owner varchar not null,
58+
client_id bigint not null,
59+
create_time timestamp not null default current_timestamp,
60+
primary key (id)
61+
);
62+
create unique index uk_t_ds_jdbc_registry_lockKey on t_ds_jdbc_registry_lock (lock_key);
63+
64+
65+
DROP TABLE IF EXISTS t_ds_jdbc_registry_client_heartbeat;
66+
create table t_ds_jdbc_registry_client_heartbeat
67+
(
68+
id bigint not null,
69+
client_name varchar not null,
70+
last_heartbeat_time bigint not null,
71+
connection_config text not null,
72+
create_time timestamp not null default current_timestamp,
73+
primary key (id)
74+
);
75+
76+
DROP TABLE IF EXISTS t_ds_jdbc_registry_data_change_event;
77+
create table t_ds_jdbc_registry_data_change_event
78+
(
79+
id bigserial not null,
80+
event_type varchar not null,
81+
jdbc_registry_data text not null,
82+
create_time timestamp not null default current_timestamp,
83+
primary key (id)
84+
);

Diff for: dolphinscheduler-meter/src/main/java/org/apache/dolphinscheduler/meter/metrics/DefaultMetricsProvider.java

+2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@
1919

2020
import org.apache.dolphinscheduler.common.utils.OSUtils;
2121

22+
import lombok.extern.slf4j.Slf4j;
2223
import io.micrometer.core.instrument.MeterRegistry;
2324

25+
@Slf4j
2426
public class DefaultMetricsProvider implements MetricsProvider {
2527

2628
private final MeterRegistry meterRegistry;

0 commit comments

Comments
 (0)