This is an automated email from the ASF dual-hosted git repository.
gosonzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-inlong.git
The following commit(s) were added to refs/heads/master by this push:
new 0f9a4ab [INLONG-3445][TubeMQ] remove hibernete for tube manager
(#3446)
0f9a4ab is described below
commit 0f9a4abb75b6264caf0ee3c187b3d5ef6e3ab9ef
Author: Schnapps <[email protected]>
AuthorDate: Wed Mar 30 09:56:59 2022 +0800
[INLONG-3445][TubeMQ] remove hibernete for tube manager (#3446)
---
.../tubemq-manager/sql/apache_tube_manager.sql | 146 +++++++++++++++++++++
.../tubemq-manager/src/main/assembly/assembly.xml | 7 +
.../inlong/tubemq/manager/entry/TopicEntry.java | 2 -
.../src/main/resources/application.properties | 3 +-
4 files changed, 154 insertions(+), 4 deletions(-)
diff --git a/inlong-tubemq/tubemq-manager/sql/apache_tube_manager.sql
b/inlong-tubemq/tubemq-manager/sql/apache_tube_manager.sql
new file mode 100644
index 0000000..7a7cc2a
--- /dev/null
+++ b/inlong-tubemq/tubemq-manager/sql/apache_tube_manager.sql
@@ -0,0 +1,146 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+SET NAMES utf8mb4;
+SET FOREIGN_KEY_CHECKS = 0;
+
+-- ----------------------------
+-- database for TubeMQ Manager
+-- ----------------------------
+CREATE DATABASE IF NOT EXISTS tubemanager;
+
+-- ----------------------------
+-- Table structure for broker
+-- ----------------------------
+DROP TABLE IF EXISTS `broker`;
+CREATE TABLE `broker` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `broker_id` bigint DEFAULT NULL,
+ `broker_ip` bigint NOT NULL,
+ `cluster_id` bigint DEFAULT NULL,
+ `create_time` datetime(6) DEFAULT NULL,
+ `create_user` varchar(255) DEFAULT NULL,
+ `modify_time` datetime(6) DEFAULT NULL,
+ `region_id` bigint DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `UKciq4ve8cnogwy80elee1am518`
(`broker_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
+-- ----------------------------
+-- Table structure for cluster
+-- ----------------------------
+DROP TABLE IF EXISTS `cluster`;
+CREATE TABLE `cluster` (
+ `cluster_id` bigint NOT NULL,
+ `cluster_name` varchar(255) DEFAULT NULL,
+ `create_time` datetime(6) DEFAULT NULL,
+ `create_user` varchar(255) DEFAULT NULL,
+ `modify_time` datetime(6) DEFAULT NULL,
+ `reload_broker_size` int NOT NULL,
+ PRIMARY KEY (`cluster_id`),
+ UNIQUE KEY `UKjo595af4i3co2onpspedgxcrs`
(`cluster_name`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
+-- ----------------------------
+-- Table structure for create_topic_task
+-- ----------------------------
+DROP TABLE IF EXISTS `create_topic_task`;
+CREATE TABLE `create_topic_task` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `cluster_id` bigint DEFAULT NULL,
+ `config_retry_times` int DEFAULT NULL,
+ `create_date` datetime(6) DEFAULT NULL,
+ `modify_date` datetime(6) DEFAULT NULL,
+ `modify_user` varchar(255) DEFAULT NULL,
+ `reload_retry_times` int DEFAULT NULL,
+ `status` int DEFAULT NULL,
+ `token` varchar(255) DEFAULT NULL,
+ `topic_name` varchar(255) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
+-- ----------------------------
+-- Table structure for master
+-- ----------------------------
+DROP TABLE IF EXISTS `master`;
+CREATE TABLE `master` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `cluster_id` bigint NOT NULL,
+ `ip` varchar(255) DEFAULT NULL,
+ `port` int NOT NULL,
+ `standby` bit(1) NOT NULL,
+ `token` varchar(255) DEFAULT NULL,
+ `web_port` int NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
+-- ----------------------------
+-- Table structure for region
+-- ----------------------------
+DROP TABLE IF EXISTS `region`;
+CREATE TABLE `region` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `cluster_id` bigint DEFAULT NULL,
+ `create_date` datetime(6) DEFAULT NULL,
+ `create_user` varchar(255) DEFAULT NULL,
+ `modify_date` datetime(6) DEFAULT NULL,
+ `modify_user` varchar(255) DEFAULT NULL,
+ `name` varchar(255) DEFAULT NULL,
+ `region_id` bigint DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `UK6bb56v767cxs5iujj2k08f1ic`
(`cluster_id`,`region_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
+-- ----------------------------
+-- Table structure for topic
+-- ----------------------------
+DROP TABLE IF EXISTS `topic`;
+CREATE TABLE `topic` (
+ `business_id` bigint NOT NULL AUTO_INCREMENT,
+ `base_dir` varchar(255) DEFAULT NULL,
+ `bg` varchar(255) DEFAULT NULL,
+ `business_cn_name` varchar(256) DEFAULT NULL,
+ `business_name` varchar(30) NOT NULL,
+ `category` varchar(255) DEFAULT NULL,
+ `cluster_id` int NOT NULL,
+ `create_time` date DEFAULT NULL,
+ `description` varchar(256) DEFAULT NULL,
+ `encoding_type` varchar(64) NOT NULL,
+ `example_data` varchar(255) DEFAULT NULL,
+ `field_splitter` varchar(10) DEFAULT NULL,
+ `import_type` varchar(255) DEFAULT NULL,
+ `in_charge` varchar(255) DEFAULT NULL,
+ `is_hybrid_data_source` int NOT NULL,
+ `is_sub_sort` int NOT NULL,
+ `issue_method` varchar(32) DEFAULT NULL,
+ `message_type` varchar(64) DEFAULT NULL,
+ `net_target` varchar(255) DEFAULT NULL,
+ `passwd` varchar(64) NOT NULL,
+ `predefined_fields` varchar(256) DEFAULT NULL,
+ `schema_name` varchar(240) NOT NULL,
+ `sn` int DEFAULT NULL,
+ `source_server` varchar(255) DEFAULT NULL,
+ `status` int NOT NULL,
+ `target_server` varchar(255) DEFAULT NULL,
+ `target_server_port` varchar(255) DEFAULT NULL,
+ `topic` varchar(64) NOT NULL,
+ `topology_name` varchar(255) DEFAULT NULL,
+ `username` varchar(32) NOT NULL,
+ PRIMARY KEY (`business_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
+SET FOREIGN_KEY_CHECKS = 1;
diff --git a/inlong-tubemq/tubemq-manager/src/main/assembly/assembly.xml
b/inlong-tubemq/tubemq-manager/src/main/assembly/assembly.xml
index e260d80..e2e973d 100644
--- a/inlong-tubemq/tubemq-manager/src/main/assembly/assembly.xml
+++ b/inlong-tubemq/tubemq-manager/src/main/assembly/assembly.xml
@@ -50,6 +50,13 @@
</includes>
</fileSet>
<fileSet>
+ <directory>sql</directory>
+ <outputDirectory>/sql</outputDirectory>
+ <includes>
+ <include>*.sql</include>
+ </includes>
+ </fileSet>
+ <fileSet>
<directory>src/main/resources</directory>
<outputDirectory>/conf</outputDirectory>
<includes>
diff --git
a/inlong-tubemq/tubemq-manager/src/main/java/org/apache/inlong/tubemq/manager/entry/TopicEntry.java
b/inlong-tubemq/tubemq-manager/src/main/java/org/apache/inlong/tubemq/manager/entry/TopicEntry.java
index e135521..0837a9f 100644
---
a/inlong-tubemq/tubemq-manager/src/main/java/org/apache/inlong/tubemq/manager/entry/TopicEntry.java
+++
b/inlong-tubemq/tubemq-manager/src/main/java/org/apache/inlong/tubemq/manager/entry/TopicEntry.java
@@ -29,7 +29,6 @@ import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import lombok.Data;
-import org.hibernate.annotations.CreationTimestamp;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
@Entity
@@ -106,7 +105,6 @@ public class TopicEntry {
private String baseDir;
- @CreationTimestamp
private Date createTime;
private String importType;
diff --git
a/inlong-tubemq/tubemq-manager/src/main/resources/application.properties
b/inlong-tubemq/tubemq-manager/src/main/resources/application.properties
index 3811c19..841c97a 100644
--- a/inlong-tubemq/tubemq-manager/src/main/resources/application.properties
+++ b/inlong-tubemq/tubemq-manager/src/main/resources/application.properties
@@ -16,13 +16,12 @@
# specific language governing permissions and limitations
# under the License.
#
-spring.jpa.hibernate.ddl-auto=update
spring.mvc.pathmatch.matching-strategy = ANT_PATH_MATCHER
# configuration for admin
topic.config.schedule=0/5 * * * * ?
broker.reload.schedule=0/5 * * * * ?
# mysql configuration for manager
-#
spring.datasource.url=jdbc:mysql://mysql_ip:mysql_port/tubemanager?useSSL=false
+#
spring.datasource.url=jdbc:mysql://mysql_ip:mysql_port/tubemanager?useSSL=false&allowPublicKeyRetrieval=true
# spring.datasource.username=mysql_username
# spring.datasource.password=mysql_password
# server port