Skip to content

Commit cdd959a

Browse files
authored
[Improve] Cleanup SQL DDL (#4268)
* [Imporve] Cleanup SQL DDL * [Improve] mysql ddl improvement * [Improve] update known-dependencies.txt
1 parent 98dd929 commit cdd959a

47 files changed

Lines changed: 1087 additions & 2107 deletions

File tree

Some content is hidden

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

streampark-common/src/main/java/org/apache/streampark/common/constants/Constants.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ private Constants() {
5353

5454
public static final String STREAMPARK_SPARKSQL_CLIENT_CLASS = "org.apache.streampark.spark.cli.SqlClient";
5555

56-
public static final String STREAMPARK_FLINKCDC_CLIENT_CLASS = "org.apache.streampark.flink.cdc.cli.CDCClient";
57-
5856
public static final String PYTHON_EXECUTABLE = "venv.zip/venv/bin/python3";
5957

6058
public static final String SINGLE_SLASH = "/";

streampark-common/src/main/java/org/apache/streampark/common/enums/FlinkJobType.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,7 @@ public enum FlinkJobType {
4343
/**
4444
* Py flink Mode
4545
*/
46-
PYFLINK("Python Flink", 3),
47-
48-
/**
49-
* Flink CDC
50-
*/
51-
FLINK_CDC("Flink CDC", 4);
46+
PYFLINK("Python Flink", 3);
5247

5348
private final String name;
5449

streampark-console/streampark-console-service/pom.xml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -411,12 +411,6 @@
411411
<version>${project.version}</version>
412412
</dependency>
413413

414-
<dependency>
415-
<groupId>org.apache.streampark</groupId>
416-
<artifactId>streampark-flink-cdcclient_${scala.binary.version}</artifactId>
417-
<version>${project.version}</version>
418-
</dependency>
419-
420414
<dependency>
421415
<groupId>com.fasterxml.jackson.module</groupId>
422416
<artifactId>jackson-module-scala_${scala.binary.version}</artifactId>

streampark-console/streampark-console-service/src/main/assembly/assembly.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
<excludes>
3333
<exclude>org.apache.streampark:streampark-flink-sqlclient_${scala.binary.version}</exclude>
3434
<exclude>org.apache.streampark:streampark-spark-sqlclient_${scala.binary.version}</exclude>
35-
<exclude>org.apache.streampark:streampark-flink-cdcclient_${scala.binary.version}</exclude>
3635
<exclude>javax.servlet:servlet-api</exclude>
3736
</excludes>
3837
</dependencySet>
@@ -41,7 +40,6 @@
4140
<includes>
4241
<include>org.apache.streampark:streampark-flink-sqlclient_${scala.binary.version}</include>
4342
<include>org.apache.streampark:streampark-spark-sqlclient_${scala.binary.version}</include>
44-
<include>org.apache.streampark:streampark-flink-cdcclient_${scala.binary.version}</include>
4543
</includes>
4644
</dependencySet>
4745
</dependencySets>

streampark-console/streampark-console-service/src/main/assembly/script/data/mysql-data.sql

Lines changed: 4 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ INSERT INTO `t_app` (`id`, `job_type`, `create_time`, `modify_time`) VALUES (100
6464
-- Records of t_spark_app
6565
-- ----------------------------
6666
insert into `t_spark_app` (
67-
`id`, `team_id`, `job_type`, `app_type`, `app_name`, `deploy_mode`, `resource_from`, `main_class`,
68-
`yarn_queue`, `k8s_image_pull_policy`, `k8s_namespace`, `state`, `option_state`, `user_id`,
69-
`description`, `tracking`, `release`, `build`, `create_time`, `modify_time`, `tags`)
67+
`id`, `team_id`, `job_type`, `app_type`, `app_name`, `deploy_mode`, `resource_from`, `main_class`,
68+
`yarn_queue`, `k8s_image_pull_policy`, `k8s_namespace`, `state`, `option_state`, `user_id`,
69+
`description`, `tracking`, `release`, `build`, `create_time`, `modify_time`, `tags`)
7070
values (100001, 100000, 2, 4, 'Spark SQL Demo', 2, 2, 'org.apache.streampark.spark.cli.SqlClient', 'default', 0, 'default', 0, 0, 100000, 'Spark SQL Demo', 0, 1, 1, now(), now(), 'streampark,test');
7171

7272
-- ----------------------------
@@ -79,7 +79,6 @@ insert into `t_spark_effective` values (100000, 100001, 4, 100000, now());
7979
-- ----------------------------
8080
insert into `t_spark_sql` values (100000, 100001, 'eNq1jr0OgjAURnee4m4FY/oCTJVUg/KT9F7cK2kQiy2W+P6KMQ6yuDh9+YZzcjIlBUkgsSkkXCbv0N9Da0ifBgOx01cDSCqvdmsIpuu9e98kavA54EPH9ajbs+HTqIPl023gsyeN8gqlIsgrqhfmoygaiTEre2vYGliDgiW/IXvd2hdymIls0d87+5f6jxdlITOCFWxVXX5npg92MWtB', null, null, 1, 1, now());
8181

82-
8382
-- ----------------------------
8483
-- Records of t_menu
8584
-- ----------------------------
@@ -190,25 +189,6 @@ insert into `t_menu` values (150502, 150500, 'member add', null, null, 'member:a
190189
insert into `t_menu` values (150503, 150500, 'member update', null, null, 'member:update', null, '1', 1, null, now(), now());
191190
insert into `t_menu` values (150504, 150500, 'member delete', null, null, 'member:delete', null, '1', 1, null, now(), now());
192191

193-
insert into `t_menu` values (150601, 150600, 'catalog view', null, null, 'catalog:view', null, '1', 1, null, now(), now());
194-
insert into `t_menu` values (150602, 150600, 'catalog create', null, null, 'catalog:create', null, '1', 1, null, now(), now());
195-
insert into `t_menu` values (150603, 150600, 'catalog update', null, null, 'catalog:update', null, '1', 1, null, now(), now());
196-
insert into `t_menu` values (150604, 150600, 'catalog delete', null, null, 'catalog:delete', null, '1', 1, null, now(), now());
197-
198-
insert into `t_menu` values (150605, 150600, 'database view', null, null, 'database:view', null, '1', 1, null, now(), now());
199-
insert into `t_menu` values (150606, 150600, 'database create', null, null, 'database:create', null, '1', 1, null, now(), now());
200-
insert into `t_menu` values (150607, 150600, 'database delete', null, null, 'database:delete', null, '1', 1, null, now(), now());
201-
202-
insert into `t_menu` values (150608, 150600, 'table view', null, null, 'table:view', null, '1', 1, null, now(), now());
203-
insert into `t_menu` values (150609, 150600, 'table create', null, null, 'table:create', null, '1', 1, null, now(), now());
204-
insert into `t_menu` values (150610, 150600, 'table update', null, null, 'table:update', null, '1', 1, null, now(), now());
205-
insert into `t_menu` values (150611, 150600, 'table view', null, null, 'table:column:add', null, '1', 1, null, now(), now());
206-
insert into `t_menu` values (150612, 150600, 'table column list', null, null, 'table:column:list', null, '1', 1, null, now(), now());
207-
insert into `t_menu` values (150613, 150600, 'table column drop', null, null, 'table:column:drop', null, '1', 1, null, now(), now());
208-
insert into `t_menu` values (150614, 150600, 'table option add', null, null, 'option:add', null, '1', 1, null, now(), now());
209-
insert into `t_menu` values (150615, 150600, 'table option remove', null, null, 'option:remove', null, '1', 1, null, now(), now());
210-
211-
-- -------
212192
-- ----------------------------
213193
-- Records of t_role
214194
-- ----------------------------
@@ -324,27 +304,11 @@ insert into `t_role_menu` values (100102, 100002, 140401);
324304
insert into `t_role_menu` values (100103, 100002, 140402);
325305
insert into `t_role_menu` values (100104, 100002, 140403);
326306
insert into `t_role_menu` values (100105, 100002, 150000);
307+
insert into `t_role_menu` values (100106, 100002, 150500);
327308
insert into `t_role_menu` values (100107, 100002, 150501);
328309
insert into `t_role_menu` values (100108, 100002, 150502);
329310
insert into `t_role_menu` values (100109, 100002, 150503);
330311
insert into `t_role_menu` values (100110, 100002, 150504);
331-
insert into `t_role_menu` values (100111, 100002, 150601);
332-
insert into `t_role_menu` values (100112, 100002, 150602);
333-
insert into `t_role_menu` values (100113, 100002, 150603);
334-
insert into `t_role_menu` values (100114, 100002, 150604);
335-
insert into `t_role_menu` values (100115, 100002, 150605);
336-
insert into `t_role_menu` values (100116, 100002, 150606);
337-
insert into `t_role_menu` values (100117, 100002, 150607);
338-
insert into `t_role_menu` values (100118, 100002, 150608);
339-
insert into `t_role_menu` values (100119, 100002, 150609);
340-
insert into `t_role_menu` values (100120, 100002, 150610);
341-
insert into `t_role_menu` values (100121, 100002, 150611);
342-
insert into `t_role_menu` values (100122, 100002, 150612);
343-
insert into `t_role_menu` values (100123, 100002, 150613);
344-
insert into `t_role_menu` values (100124, 100002, 150614);
345-
insert into `t_role_menu` values (100125, 100002, 150615);
346-
insert into `t_role_menu` values (100126, 100002, 150600);
347-
insert into `t_role_menu` values (100127, 100001, 150600);
348312

349313
-- ----------------------------
350314
-- Records of t_setting

streampark-console/streampark-console-service/src/main/assembly/script/data/pgsql-data.sql

Lines changed: 3 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ insert into "public"."t_flink_sql" values (100000, 100000, 'eNqlUUtPhDAQvu+vmFs1
5050
-- Records of t_spark_app
5151
-- ----------------------------
5252
insert into "public"."t_spark_app" (
53-
"id", "team_id", "job_type", "app_type", "app_name", "deploy_mode", "resource_from", "main_class",
54-
"yarn_queue", "k8s_image_pull_policy", "k8s_namespace", "state", "option_state", "user_id",
55-
"description", "tracking", "release", "build", "create_time", "modify_time", "tags")
53+
"id", "team_id", "job_type", "app_type", "app_name", "deploy_mode", "resource_from", "main_class",
54+
"yarn_queue", "k8s_image_pull_policy", "k8s_namespace", "state", "option_state", "user_id",
55+
"description", "tracking", "release", "build", "create_time", "modify_time", "tags")
5656
values (100000, 100000, 2, 4, 'Spark SQL Demo', 2, 2, 'org.apache.streampark.spark.cli.SqlClient', 'default', 0, 'default', 0, 0, 100000, 'Spark SQL Demo', 0, 1, 1, now(), now(), 'streampark,test');
5757

5858
-- ----------------------------
@@ -153,22 +153,7 @@ insert into "public"."t_menu" values (130504, 130500, 'link delete', null, null,
153153
insert into "public"."t_menu" values (130601, 130600, 'add yarn queue', null, null, 'yarnQueue:create', '', '1', '0', null, now(), now());
154154
insert into "public"."t_menu" values (130602, 130600, 'edit yarn queue', null, null, 'yarnQueue:update', '', '1', '0', null, now(), now());
155155
insert into "public"."t_menu" values (130603, 130600, 'delete yarn queue', null, null, 'yarnQueue:delete', '', '1', '0', null, now(), now());
156-
insert into "public"."t_menu" values (130701, 130700, 'catalog view', null, null, 'catalog:view', '', '1', '0', null, now(), now());
157-
insert into "public"."t_menu" values (130702, 130700, 'catalog create', null, null, 'catalog:create', '', '1', '0', null, now(), now());
158-
insert into "public"."t_menu" values (130703, 130700, 'catalog delete', null, null, 'catalog:delete', '', '1', '0', null, now(), now());
159-
insert into "public"."t_menu" values (130704, 130700, 'catalog update', null, null, 'catalog:update', '', '1', '0', null, now(), now());
160-
insert into "public"."t_menu" values (150605, 150600, 'database view', null, null, 'database:view', null, '1', 1, null, now(), now());
161-
insert into "public"."t_menu" values (150606, 150600, 'database create', null, null, 'database:create', null, '1', 1, null, now(), now());
162-
insert into "public"."t_menu" values (150607, 150600, 'database delete', null, null, 'database:delete', null, '1', 1, null, now(), now());
163156

164-
insert into "public"."t_menu" values (150608, 150600, 'table view', null, null, 'table:view', null, '1', 1, null, now(), now());
165-
insert into "public"."t_menu" values (150609, 150600, 'table create', null, null, 'table:create', null, '1', 1, null, now(), now());
166-
insert into "public"."t_menu" values (150610, 150600, 'table update', null, null, 'table:update', null, '1', 1, null, now(), now());
167-
insert into "public"."t_menu" values (150611, 150600, 'table view', null, null, 'table:column:add', null, '1', 1, null, now(), now());
168-
insert into "public"."t_menu" values (150612, 150600, 'table column list', null, null, 'table:column:list', null, '1', 1, null, now(), now());
169-
insert into "public"."t_menu" values (150613, 150600, 'table column drop', null, null, 'table:column:drop', null, '1', 1, null, now(), now());
170-
insert into "public"."t_menu" values (150614, 150600, 'table option add', null, null, 'option:add', null, '1', 1, null, now(), now());
171-
insert into "public"."t_menu" values (150615, 150600, 'table option remove', null, null, 'option:remove', null, '1', 1, null, now(), now());
172157
-- ----------------------------
173158
-- Records of t_role
174159
-- ----------------------------
@@ -273,23 +258,6 @@ insert into "public"."t_role_menu" (role_id, menu_id) values (100002, 130600);
273258
insert into "public"."t_role_menu" (role_id, menu_id) values (100002, 130601);
274259
insert into "public"."t_role_menu" (role_id, menu_id) values (100002, 130602);
275260
insert into "public"."t_role_menu" (role_id, menu_id) values (100002, 130603);
276-
insert into "public"."t_role_menu" (role_id, menu_id) values (100002, 130701);
277-
insert into "public"."t_role_menu" (role_id, menu_id) values (100002, 130702);
278-
insert into "public"."t_role_menu" (role_id, menu_id) values (100002, 130703);
279-
insert into "public"."t_role_menu" (role_id, menu_id) values (100002, 130704);
280-
insert into "public"."t_role_menu" (role_id, menu_id) values (100002, 150605);
281-
insert into "public"."t_role_menu" (role_id, menu_id) values (100002, 150606);
282-
insert into "public"."t_role_menu" (role_id, menu_id) values (100002, 150607);
283-
insert into "public"."t_role_menu" (role_id, menu_id) values (100002, 150608);
284-
insert into "public"."t_role_menu" (role_id, menu_id) values (100002, 150609);
285-
insert into "public"."t_role_menu" (role_id, menu_id) values (100002, 150610);
286-
insert into "public"."t_role_menu" (role_id, menu_id) values (100002, 150611);
287-
insert into "public"."t_role_menu" (role_id, menu_id) values (100002, 150612);
288-
insert into "public"."t_role_menu" (role_id, menu_id) values (100002, 150613);
289-
insert into "public"."t_role_menu" (role_id, menu_id) values (100002, 150614);
290-
insert into "public"."t_role_menu" (role_id, menu_id) values (100002, 150615);
291-
insert into "public"."t_role_menu" (role_id, menu_id) values (100002, 150600);
292-
insert into "public"."t_role_menu" (role_id, menu_id) values (100001, 150600);
293261

294262
-- ----------------------------
295263
-- Records of t_setting

streampark-console/streampark-console-service/src/main/assembly/script/schema/mysql-schema.sql

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -542,8 +542,6 @@ create table `t_yarn_queue` (
542542
unique key `unq_team_id_queue_label` (`team_id`, `queue_label`) using btree
543543
) engine = innodb default charset = utf8mb4 collate = utf8mb4_general_ci;
544544

545-
546-
547545
-- ----------------------------
548546
-- Table of t_resource
549547
-- ----------------------------
@@ -671,22 +669,6 @@ create table `t_spark_log` (
671669
primary key (`id`) using btree
672670
) engine=innodb auto_increment=100000 default charset=utf8mb4 collate=utf8mb4_general_ci;
673671

674-
-- ----------------------------
675-
-- table structure for t_flink_catalog
676-
-- ----------------------------
677-
drop table if exists `t_flink_catalog`;
678-
CREATE TABLE `t_flink_catalog` (
679-
`id` BIGINT AUTO_INCREMENT PRIMARY KEY,
680-
`team_id` BIGINT NOT NULL,
681-
`user_id` BIGINT DEFAULT NULL,
682-
`catalog_type` VARCHAR(255) NOT NULL,
683-
`catalog_name` VARCHAR(255) NOT NULL,
684-
`configuration` TEXT,
685-
`create_time` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
686-
`update_time` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
687-
UNIQUE KEY uniq_catalog_name (`catalog_name`)
688-
) ENGINE=InnoDB auto_increment=100000 default charset=utf8mb4 collate=utf8mb4_general_ci;
689-
690672
-- ----------------------------
691673
-- table structure for t_spark_effective
692674
-- ----------------------------

streampark-console/streampark-console-service/src/main/assembly/script/schema/pgsql-schema.sql

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -817,27 +817,6 @@ create table "public"."t_external_link" (
817817
;
818818
alter table "public"."t_external_link" add constraint "t_external_link_pkey" primary key ("id");
819819

820-
-- ----------------------------
821-
-- table structure for t_flink_catalog
822-
-- ----------------------------
823-
824-
create sequence "public"."streampark_t_flink_catalog_id_seq"
825-
increment 1 start 10000 cache 1 minvalue 10000 maxvalue 9223372036854775807;
826-
827-
CREATE TABLE "public"."t_flink_catalog" (
828-
"id" int8 not null default nextval('streampark_t_flink_catalog_id_seq'::regclass),
829-
"team_id" BIGINT NOT NULL,
830-
"user_id" BIGINT DEFAULT NULL,
831-
"catalog_type" VARCHAR(255) NOT NULL,
832-
"catalog_name" VARCHAR(255) NOT NULL,
833-
"configuration" TEXT,
834-
"create_time" TIMESTAMP WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP,
835-
"update_time" TIMESTAMP WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP,
836-
CONSTRAINT uniq_catalog_name UNIQUE (catalog_name)
837-
);
838-
alter table "public"."t_flink_catalog" add constraint "t_flink_catalog_pkey" primary key ("id");
839-
840-
841820
-- ----------------------------
842821
-- table structure for t_yarn_queue
843822
-- ----------------------------

0 commit comments

Comments
 (0)