Skip to content

Commit

Permalink
添加初始化数据
Browse files Browse the repository at this point in the history
  • Loading branch information
gaoyf committed Oct 26, 2022
1 parent cd8eba9 commit 2e99b78
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
3 changes: 2 additions & 1 deletion mq-cloud/sql/4.9.3.sql
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ alter table `user_producer` add column `http_enabled` int(4) NOT NULL DEFAULT '0
-- ----------------------------
INSERT INTO `broker_config`(`gid`, `key`, `value`, `desc`, `tip`, `order`, `dynamic_modify`, `option`, `required`) VALUES (1, 'jvmMemory', '8g', 'broker启动内存大小,对应jvm参数中的xmx/xms,单位:g或m', '', 16, 0, NULL, 0);
INSERT INTO `broker_config`(`gid`, `key`, `value`, `desc`, `tip`, `order`, `dynamic_modify`, `option`, `required`) VALUES (1, 'maxDirectMemorySize', '15g', '堆外内存大小,单位:g', NULL, 17, 0, NULL, 0);
INSERT INTO `broker_config`(`gid`, `key`, `value`, `desc`, `tip`, `order`, `dynamic_modify`, `option`, `required`) VALUES (1, 'physicalMemorySize', '0', '物理内存(单位字节),0代表使用全部物理内存', '部署到docker或多个broker部署到一台机器时使用', 18, 1, NULL, 0);
INSERT INTO `broker_config`(`gid`, `key`, `value`, `desc`, `tip`, `order`, `dynamic_modify`, `option`, `required`) VALUES (1, 'physicalMemorySize', '0', '物理内存(单位字节),0代表使用全部物理内存', '部署到docker或多个broker部署到一台机器时使用', 18, 1, NULL, 0);
INSERT INTO `common_config`(`key`, `value`, `comment`) VALUES ('mqProxyServerString', '127.0.0.1', 'MQProxy服务器地址列表,多个用逗号分割');
4 changes: 3 additions & 1 deletion mq-cloud/sql/init.sql
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,7 @@ INSERT INTO `common_config`(`key`, `value`, `comment`) VALUES ('queryMessageFrom
INSERT INTO `common_config`(`key`, `value`, `comment`) VALUES ('consumeFallBehindSize', '1073741824', '消费落后多少进行预警,单位byte');
INSERT INTO `common_config`(`key`, `value`, `comment`) VALUES ('messageTypeLocation', 'classpath*:msg-type/*.class', '消息序列化方式为protostuf并且发送为自定义类型时,需要配置消息类型的class路径,例如 1:classpath*:msg-type/*.class 2:jar:file:///tmp/msgType.jar!/**/*.class 3:jar:http://127.0.0.1:8080/msgType.jar!/**/*.class');
INSERT INTO `common_config`(`key`, `value`, `comment`) VALUES ('slaveFallBehindSize', '10485760', 'slave的commitlog落后master多少进行预警,单位byte');
INSERT INTO `common_config`(`key`, `value`, `comment`) VALUES ('mqProxyServerString', '127.0.0.1', 'MQProxy服务器地址列表,多个用逗号分割');
-- ----------------------------
-- warn_config init
-- ----------------------------
Expand Down Expand Up @@ -1016,8 +1017,9 @@ insert into broker_config(`gid`, `key`, `value`, `desc`, `tip`, `order`, `dynami
insert into broker_config(`gid`, `key`, `value`, `desc`, `tip`, `order`, `dynamic_modify`, `option`, `required`) values(24, 'dLegerPeers', null, 'DLeger相关配置', null, 26, 0, null, 0);
insert into broker_config(`gid`, `key`, `value`, `desc`, `tip`, `order`, `dynamic_modify`, `option`, `required`) values(24, 'dLegerSelfId', null, 'DLeger相关配置', null, 27, 0, null, 0);
insert into broker_config(`gid`, `key`, `value`, `desc`, `tip`, `order`, `dynamic_modify`, `option`, `required`) values(24, 'enableScheduleMessageStats', 'true', '开启schedule队列消息统计', null, 28, 1, null, 0);
insert into broker_config(`gid`, `key`, `value`, `desc`, `tip`, `order`, `dynamic_modify`, `option`, `required`) values(24, 'isEnableBatchPush', 'false', 'DLedger批量复制', null, 29, 0, null, 1);
insert into broker_config(`gid`, `key`, `value`, `desc`, `tip`, `order`, `dynamic_modify`, `option`, `required`) values(24, 'isEnableBatchPush', 'false', 'DLedger批量复制', null, 29, 0, null, 0);
insert into broker_config(`gid`, `key`, `value`, `desc`, `tip`, `order`, `dynamic_modify`, `option`, `required`) values(24, 'autoDeleteUnusedStats', 'false', '删除topic或订阅时一起删除相关统计', null, 30, 1, null, 0);
insert into broker_config(`gid`, `key`, `value`, `desc`, `tip`, `order`, `dynamic_modify`, `option`, `required`) values(24, 'registerBroker', 'true', '是否注册broker', null, 31, 1, null, 0);

-- ----------------------------
-- Table structure for `topic_traffic_warn_config`
Expand Down
8 changes: 6 additions & 2 deletions mq-cloud/src/main/resources/h2db/data.sql
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ INSERT IGNORE INTO `common_config` VALUES ('23', 'queryMessageFromSlave', 'true
INSERT IGNORE INTO `common_config` VALUES ('24', 'consumeFallBehindSize', '1073741824', '消费落后多少进行预警,单位byte');
INSERT IGNORE INTO `common_config` VALUES ('25', 'messageTypeLocation', 'classpath*:msg-type/*.class', '消息序列化方式为protostuf并且发送为自定义类型时,需要配置消息类型的class路径,例如 1:classpath*:msg-type/*.class 2:jar:file:///tmp/msgType.jar!/**/*.class 3:jar:http://127.0.0.1:8080/msgType.jar!/**/*.class');
INSERT IGNORE INTO `common_config` VALUES ('26', 'slaveFallBehindSize', '10485760', 'slave的commitlog落后master多少进行预警,单位byte');
INSERT IGNORE INTO `common_config` VALUES ('27', 'mqProxyServerString', '127.0.0.1', 'MQProxy服务器地址列表,多个用逗号分割');

-- ----------------------------
-- warn_config init
-- ----------------------------
Expand Down Expand Up @@ -271,13 +273,15 @@ INSERT IGNORE into broker_config(`gid`, `key`, `value`, `desc`, `tip`, `order`,
INSERT IGNORE into broker_config(`gid`, `key`, `value`, `desc`, `tip`, `order`, `dynamic_modify`, `option`, `required`) values(24, 'dLegerPeers', null, 'DLeger相关配置', null, 26, 0, null, 0);
INSERT IGNORE into broker_config(`gid`, `key`, `value`, `desc`, `tip`, `order`, `dynamic_modify`, `option`, `required`) values(24, 'dLegerSelfId', null, 'DLeger相关配置', null, 27, 0, null, 0);
INSERT IGNORE into broker_config(`gid`, `key`, `value`, `desc`, `tip`, `order`, `dynamic_modify`, `option`, `required`) values(24, 'enableScheduleMessageStats', 'true', '开启schedule队列消息统计', null, 28, 1, null, 0);
INSERT IGNORE into broker_config(`gid`, `key`, `value`, `desc`, `tip`, `order`, `dynamic_modify`, `option`, `required`) values(24, 'isEnableBatchPush', 'false', 'DLedger批量复制', null, 29, 0, null, 1);
INSERT IGNORE into broker_config(`gid`, `key`, `value`, `desc`, `tip`, `order`, `dynamic_modify`, `option`, `required`) values(24, 'isEnableBatchPush', 'false', 'DLedger批量复制', null, 29, 0, null, 0);
INSERT IGNORE into broker_config(`gid`, `key`, `value`, `desc`, `tip`, `order`, `dynamic_modify`, `option`, `required`) values(24, 'autoDeleteUnusedStats', 'false', '删除topic或订阅时一起删除相关统计', null, 30, 1, null, 0);
insert IGNORE into broker_config(`gid`, `key`, `value`, `desc`, `tip`, `order`, `dynamic_modify`, `option`, `required`) values(24, 'registerBroker', 'true', '是否注册broker', null, 31, 1, null, 0);

-- ----------------------------
-- topic_traffic_warn_config init
-- ----------------------------
INSERT IGNORE INTO `topic_traffic_warn_config`(avg_multiplier,avg_max_percentage_increase,max_max_percentage_increase,alarm_receiver) VALUES (5, 200, 30, 0);

INSERT IGNORE INTO `broker_config`(`gid`, `key`, `value`, `desc`, `tip`, `order`, `dynamic_modify`, `option`, `required`) VALUES (1, 'jvmMemory', '8g', 'broker启动内存大小,对应jvm参数中的xmx/xms,单位:g或m', '', 16, 0, NULL, 0);
INSERT IGNORE INTO `broker_config`(`gid`, `key`, `value`, `desc`, `tip`, `order`, `dynamic_modify`, `option`, `required`) VALUES (1, 'maxDirectMemorySize', '15g', '堆外内存大小,单位:g', NULL, 17, 0, NULL, 0);
INSERT IGNORE INTO `broker_config`(`gid`, `key`, `value`, `desc`, `tip`, `order`, `dynamic_modify`, `option`, `required`) VALUES (1, 'maxDirectMemorySize', '15g', '堆外内存大小,单位:g', NULL, 17, 0, NULL, 0);
INSERT IGNORE INTO `broker_config`(`gid`, `key`, `value`, `desc`, `tip`, `order`, `dynamic_modify`, `option`, `required`) VALUES (1, 'physicalMemorySize', '0', '物理内存(单位字节),0代表使用全部物理内存', '部署到docker或多个broker部署到一台机器时使用', 18, 1, NULL, 0);
5 changes: 4 additions & 1 deletion mq-cloud/src/main/resources/h2db/demo.sql
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ INSERT IGNORE INTO `common_config` VALUES ('23', 'queryMessageFromSlave', 'true
INSERT IGNORE INTO `common_config` VALUES ('24', 'consumeFallBehindSize', '1073741824', '消费落后多少进行预警,单位byte');
INSERT IGNORE INTO `common_config` VALUES ('25', 'messageTypeLocation', 'classpath*:msg-type/*.class', '消息序列化方式为protostuf并且发送为自定义类型时,需要配置消息类型的class路径,例如 1:classpath*:msg-type/*.class 2:jar:file:///tmp/msgType.jar!/**/*.class 3:jar:http://127.0.0.1:8080/msgType.jar!/**/*.class');
INSERT IGNORE INTO `common_config` VALUES ('26', 'slaveFallBehindSize', '10485760', 'slave的commitlog落后master多少进行预警,单位byte');
INSERT IGNORE INTO `common_config` VALUES ('27', 'mqProxyServerString', '127.0.0.1', 'MQProxy服务器地址列表,多个用逗号分割');

-- ----------------------------
-- warn_config init
-- ----------------------------
Expand Down Expand Up @@ -271,8 +273,9 @@ INSERT IGNORE into broker_config(`gid`, `key`, `value`, `desc`, `tip`, `order`,
INSERT IGNORE into broker_config(`gid`, `key`, `value`, `desc`, `tip`, `order`, `dynamic_modify`, `option`, `required`) values(24, 'dLegerPeers', null, 'DLeger相关配置', null, 26, 0, null, 0);
INSERT IGNORE into broker_config(`gid`, `key`, `value`, `desc`, `tip`, `order`, `dynamic_modify`, `option`, `required`) values(24, 'dLegerSelfId', null, 'DLeger相关配置', null, 27, 0, null, 0);
INSERT IGNORE into broker_config(`gid`, `key`, `value`, `desc`, `tip`, `order`, `dynamic_modify`, `option`, `required`) values(24, 'enableScheduleMessageStats', 'true', '开启schedule队列消息统计', null, 28, 1, null, 0);
INSERT IGNORE into broker_config(`gid`, `key`, `value`, `desc`, `tip`, `order`, `dynamic_modify`, `option`, `required`) values(24, 'isEnableBatchPush', 'false', 'DLedger批量复制', null, 29, 0, null, 1);
INSERT IGNORE into broker_config(`gid`, `key`, `value`, `desc`, `tip`, `order`, `dynamic_modify`, `option`, `required`) values(24, 'isEnableBatchPush', 'false', 'DLedger批量复制', null, 29, 0, null, 0);
INSERT IGNORE into broker_config(`gid`, `key`, `value`, `desc`, `tip`, `order`, `dynamic_modify`, `option`, `required`) values(24, 'autoDeleteUnusedStats', 'false', '删除topic或订阅时一起删除相关统计', null, 30, 1, null, 0);
insert IGNORE into broker_config(`gid`, `key`, `value`, `desc`, `tip`, `order`, `dynamic_modify`, `option`, `required`) values(24, 'registerBroker', 'true', '是否注册broker', null, 31, 1, null, 0);

-- ----------------------------
-- topic_traffic_warn_config init
Expand Down

0 comments on commit 2e99b78

Please sign in to comment.