You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by GitBox <gi...@apache.org> on 2022/06/29 14:44:26 UTC

[GitHub] [incubator-seatunnel] quanzhian opened a new pull request, #2088: [Feature][admin-server] Add Admin-Server for seatunnel

quanzhian opened a new pull request, #2088:
URL: https://github.com/apache/incubator-seatunnel/pull/2088

   <!--
   
   Thank you for contributing to SeaTunnel! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   ## Contribution Checklist
   
     - Make sure that the pull request corresponds to a [GITHUB issue](https://github.com/apache/incubator-seatunnel/issues).
   
     - Name the pull request in the form "[Feature] [component] Title of the pull request", where *Feature* can be replaced by `Hotfix`, `Bug`, etc.
   
     - Minor fixes should be named following this pattern: `[hotfix] [docs] Fix typo in README.md doc`.
   
   -->
   
   ## Purpose of this pull request
   
   <!-- Describe the purpose of this pull request. For example: This pull request adds checkstyle plugin.-->
   
   ## Check list
   
   * [ ] Code changed are covered with tests, or it does not need tests for reason:
   * [ ] If any new Jar binary package adding in your PR, please add License Notice according
     [New License Guide](https://github.com/apache/incubator-seatunnel/blob/dev/docs/en/contribution/new-license.md)
   * [ ] If necessary, please update the documentation to describe the new feature. https://github.com/apache/incubator-seatunnel/tree/dev/docs
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] dijiekstra commented on pull request #2088: [Feature][admin-server] Add Admin-Server for seatunnel

Posted by GitBox <gi...@apache.org>.
dijiekstra commented on PR #2088:
URL: https://github.com/apache/incubator-seatunnel/pull/2088#issuecomment-1170844436

   Hi @quanzhian 
   It's a good pr.
   And u say it's from [https://github.com/apache/incubator-seatunnel/issues/1947](https://github.com/apache/incubator-seatunnel/pull/url). But I reviewed the code , it doesn't seem to match my design.
   Can u show your design?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] CalvinKirs commented on pull request #2088: [Feature][admin-server] Add Admin-Server for seatunnel

Posted by GitBox <gi...@apache.org>.
CalvinKirs commented on PR #2088:
URL: https://github.com/apache/incubator-seatunnel/pull/2088#issuecomment-1170670936

   hi,Which Issue is this, and is there a design detail?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] Hisoka-X commented on pull request #2088: [Feature][admin-server] Add Admin-Server for seatunnel

Posted by GitBox <gi...@apache.org>.
Hisoka-X commented on PR #2088:
URL: https://github.com/apache/incubator-seatunnel/pull/2088#issuecomment-1196206430

   @dijiekstra @quanzhian Any update for this PR?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] quanzhian closed pull request #2088: [Feature][admin-server] Add Admin-Server for seatunnel

Posted by GitBox <gi...@apache.org>.
quanzhian closed pull request #2088: [Feature][admin-server] Add Admin-Server for seatunnel
URL: https://github.com/apache/incubator-seatunnel/pull/2088


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] quanzhian commented on pull request #2088: [Feature][admin-server] Add Admin-Server for seatunnel

Posted by GitBox <gi...@apache.org>.
quanzhian commented on PR #2088:
URL: https://github.com/apache/incubator-seatunnel/pull/2088#issuecomment-1197932959

   I will update it next week. @Hisoka-X 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] quanzhian commented on pull request #2088: [Feature][admin-server] Add Admin-Server for seatunnel

Posted by GitBox <gi...@apache.org>.
quanzhian commented on PR #2088:
URL: https://github.com/apache/incubator-seatunnel/pull/2088#issuecomment-1170875862

   ONLINE API VIEW
   URL: https://www.apifox.cn/apidoc/shared-c6e2e561-8e6d-446d-9386-1c4a2c3ab50f PASSWORD : seatunnel-1947
   
   
   According to the interface API design, only the management APIs of users, data sources, tasks and task instances are ready to be implemented. In addition, the new host table is reserved for the remote server to execute shell command startup tasks (this is designed because some real deployment environments are not accessible to the external network and can only be accessed on the specified server for security). Timing and scripts have not been designed yet..


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] quanzhian commented on pull request #2088: [Feature][admin-server] Add Admin-Server for seatunnel

Posted by GitBox <gi...@apache.org>.
quanzhian commented on PR #2088:
URL: https://github.com/apache/incubator-seatunnel/pull/2088#issuecomment-1170690288

   hi,  @CalvinKirs  , from [https://github.com/apache/incubator-seatunnel/issues/1947](url)
   
   Database design:
   ![image](https://user-images.githubusercontent.com/8474821/176581024-68865820-eadf-4391-8258-5da3d4a763f3.png)
   
   Database table design details script:
   
   CREATE DATABASE IF NOT EXISTS seatunnel_db DEFAULT CHARSET utf8mb4;
   
   SET NAMES utf8mb4;
   
   use seatunnel_db;
   
   DROP TABLE IF EXISTS t_st_datasource;
   CREATE TABLE t_st_datasource
   (
       `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
       `name` varchar(64) NOT NULL COMMENT '名称',
       `type` varchar(32) NOT NULL COMMENT '数据源类型',
       `configuration` varchar(1000)  NOT NULL COMMENT '配置',
       `tags` varchar(256) NULL DEFAULT NULL COMMENT '标签集',
       `description` varchar(256) NULL DEFAULT NULL COMMENT '描述',
       `status` int(11) NULL DEFAULT NULL COMMENT '状态: 1->有效、2->无效',
       `creator_id` int(11) NULL DEFAULT NULL COMMENT '创建人ID',
       `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
       `mender_id` int(11) NULL DEFAULT NULL COMMENT '修改人ID',
       `update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
       PRIMARY KEY (`id`) USING BTREE
   ) COMMENT = '数据源表';
   
   DROP TABLE IF EXISTS t_st_task;
   CREATE TABLE t_st_task
   (
       `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
       `name` varchar(100) NOT NULL COMMENT '任务名称',
       `type` varchar(32) NOT NULL COMMENT '任务类型: spark,spark-sql,flink,flink-sql',
       `config_content` text NOT NULL COMMENT '任务配置内容',
       `tags` varchar(256) NULL DEFAULT NULL COMMENT '标签集',
       `description` varchar(256) NULL DEFAULT NULL COMMENT '描述',
       `status` int(11) NULL DEFAULT NULL COMMENT '状态: 1->上线、2->下线',
       `creator_id` int(11) NULL DEFAULT NULL COMMENT '创建人ID',
       `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
       `mender_id` int(11) NULL DEFAULT NULL COMMENT '修改人ID',
       `update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
       PRIMARY KEY (`id`) USING BTREE
   ) COMMENT = '任务配置信息表';
   
   DROP TABLE IF EXISTS t_st_task_instance;
   CREATE TABLE t_st_task_instance
   (
       `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
       `task_id` bigint(20) NOT NULL COMMENT '任务ID',
       `name` varchar(256) NOT NULL COMMENT '任务实例名称',
       `type` varchar(32) NOT NULL COMMENT '任务类型: spark,spark-sql,flink,flink-sql',
       `config_content` text NOT NULL COMMENT '任务配置内容',
       `command` varchar(256) NULL DEFAULT NULL COMMENT '任务执行命令',
       `host_id` bigint(20) NULL DEFAULT NULL COMMENT '主机信息表ID',
       `instance_status` int(11) NULL DEFAULT NULL COMMENT '任务执行状态: 1->启动中、2->运行中、3->已完成、4->失败、5->停止',
       `creator_id` int(11) NULL DEFAULT NULL COMMENT '创建人ID',
       `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
       `sync_rate` bigint(20) NULL DEFAULT NULL COMMENT '速率',
       `sync_current_records` bigint(20) NULL DEFAULT NULL COMMENT '当前同步数量',
       `sync_volume` bigint(20) NULL DEFAULT NULL COMMENT '容量',
       `start_time` datetime(0) NULL DEFAULT NULL COMMENT '任务开始时间',
       `end_time` datetime(0) NULL DEFAULT NULL COMMENT '任务结束时间',
       PRIMARY KEY (`id`) USING BTREE
   ) COMMENT = '任务实例表';
   
   
   DROP TABLE IF EXISTS t_st_host;
   CREATE TABLE t_st_host
   (
       `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
       `name` varchar(64) NOT NULL COMMENT '名称',
       `description` varchar(256) NOT NULL COMMENT '描述',
       `host` varchar(50) NULL DEFAULT NULL COMMENT '主机IP',
       `host_port` varchar(50) NULL DEFAULT NULL COMMENT '主机端口',
       `host_user` varchar(50) NULL DEFAULT NULL COMMENT '主机用户',
       `host_user_pwd` varchar(50) NULL DEFAULT NULL COMMENT '主机用户密码',
       `root_dir` varchar(256) NULL DEFAULT NULL COMMENT '根目录',
       `status` int(11) NULL DEFAULT NULL COMMENT '状态: 1->有效、2->无效',
       `creator_id` int(11) NULL DEFAULT NULL COMMENT '创建人ID',
       `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
       `mender_id` int(11) NULL DEFAULT NULL COMMENT '修改人ID',
       `update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
       PRIMARY KEY (`id`) USING BTREE
   ) COMMENT = '服务主机信息表';
   
   DROP TABLE IF EXISTS t_st_alert_config;
   CREATE TABLE t_st_alert_config
   (
       `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
       `name` varchar(64) NOT NULL COMMENT '名称',
       `type` varchar(32) NOT NULL COMMENT '类型: email->邮箱、sms->短信',
       `config_content` text NOT NULL COMMENT '配置内容',
       `status` int(11) NULL DEFAULT NULL COMMENT '状态: 1->有效、2->无效',
       `creator_id` int(11) NULL DEFAULT NULL COMMENT '创建人ID',
       `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
       `mender_id` int(11) NULL DEFAULT NULL COMMENT '修改人ID',
       `update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
       PRIMARY KEY (`id`) USING BTREE
   ) COMMENT = '告警配置信息表';
   
   DROP TABLE IF EXISTS t_st_alert_group;
   CREATE TABLE t_st_alert_group
   (
       `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
       `name` varchar(64) NOT NULL COMMENT '名称',
       `alert_id` bigint(20) NULL DEFAULT NULL COMMENT '告警配置ID',
       `user_ids` varchar(500) NOT NULL COMMENT '告警用户ID集',
       `status` int(11) NULL DEFAULT NULL COMMENT '状态: 1->有效、2->无效',
       `creator_id` int(11) NULL DEFAULT NULL COMMENT '创建人ID',
       `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
       `mender_id` int(11) NULL DEFAULT NULL COMMENT '修改人ID',
       `update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
       PRIMARY KEY (`id`) USING BTREE
   ) COMMENT = '告警组信息表';
   
   DROP TABLE IF EXISTS t_st_alert_message;
   CREATE TABLE t_st_alert_message
   (
       `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
       `alert_id` bigint(20) NULL DEFAULT NULL COMMENT '告警配置ID',
       `name` varchar(64) NOT NULL COMMENT '标题',
       `alert_content` text NOT NULL COMMENT '告警内容',
       `status` int(11) NULL DEFAULT NULL COMMENT '状态: 1->成功、2->失败',
       `creator_id` int(11) NULL DEFAULT NULL COMMENT '创建人ID',
       `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
       PRIMARY KEY (`id`) USING BTREE
   ) COMMENT = '告警信息记录表';
   
   
   DROP TABLE IF EXISTS t_st_user;
   CREATE TABLE t_st_user
   (
       `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
       `username` VARCHAR(30) NOT NULL COMMENT '用户名',
       `password` varchar(64) NOT NULL COMMENT '用户密码',
       `salt` varchar(64) NOT NULL COMMENT '盐值',
       `type` int(11) NOT NULL COMMENT '用户类型: 1->管理员、2->普通用户',
       `email` varchar(100) NULL DEFAULT NULL COMMENT '邮箱',
       `status` int(11) NOT NULL COMMENT '状态: 1->有效、2->无效',
       `creator_id` int(11) NULL DEFAULT NULL COMMENT '创建人ID',
       `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
       `mender_id` int(11) NULL DEFAULT NULL COMMENT '修改人ID',
       `update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
       PRIMARY KEY (`id`) USING BTREE,
       UNIQUE KEY `idx_st_user_username` (`username`)
   ) COMMENT = '用户表';
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org