datax入门(data-web的简单使用)——02
1. 前言
1.1 关于data-web官网
1.1.1 源码下载
https://gitee.com/liuersusu/datax-web.
1.1.2 datax-Web部署手册
1.1.2.1 Linux环境部署手册
1.1.2.2 本地开发环境部署手册
1.2 关于datax入门
2. 下载之后打包、启动、登录
2.1 我的本地环境
- JDK1.8,maven3.9.0,python3.11,mysql8
2.2 修改配置
- 如下:
- datax-admin->application.yml如下:
server:port:8080# port: ${server.port}spring:#数据源# datasource:# # username: root# #password: root# #url: jdbc:mysql://localhost:3306/datax_web?serverTimezone=Asia/Shanghai&useLegacyDatetimeCode=false&useSSL=false&nullNamePatternMatchesAll=true&useUnicode=true&characterEncoding=UTF-8# password: ${DB_PASSWORD:password}# username: ${DB_USERNAME:username}# url: jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_DATABASE:dataxweb}?serverTimezone=Asia/Shanghai&useLegacyDatetimeCode=false&useSSL=false&nullNamePatternMatchesAll=true&useUnicode=true&characterEncoding=UTF-8# driver-class-name: com.mysql.jdbc.Driverdatasource:# username: root#password: root#url: jdbc:mysql://localhost:3306/datax_web?serverTimezone=Asia/Shanghai&useLegacyDatetimeCode=false&useSSL=false&nullNamePatternMatchesAll=true&useUnicode=true&characterEncoding=UTF-8username: root password: susu@123 url: jdbc:mysql://127.0.0.1:3306/datax_1?serverTimezone=Asia/Shanghai&useLegacyDatetimeCode=false&useSSL=false&nullNamePatternMatchesAll=true&useUnicode=true&characterEncoding=UTF-8driver-class-name: com.mysql.jdbc.Driver hikari:## 最小空闲连接数量minimum-idle:5## 空闲连接存活最大时间,默认600000(10分钟)idle-timeout:180000## 连接池最大连接数,默认是10maximum-pool-size:10## 数据库连接超时时间,默认30秒,即30000connection-timeout:30000connection-test-query: SELECT 1 ##此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认1800000即30分钟max-lifetime:1800000# datax-web emailmail:host: smtp.qq.com port:25username: [email protected] password: xxx# username: ${mail.username}# password: ${mail.password}properties:mail:smtp:auth:truestarttls:enable:truerequired:truesocketFactory:class: javax.net.ssl.SSLSocketFactorymanagement:health:mail:enabled:falseserver:servlet:context-path: /actuatormybatis-plus:# mapper.xml文件扫描mapper-locations: classpath*:/mybatis-mapper/*Mapper.xml# 实体扫描,多个package用逗号或者分号分隔#typeAliasesPackage: com.yibo.essyncclient.*.entityglobal-config:# 数据库相关配置db-config:# 主键类型 AUTO:"数据库ID自增", INPUT:"用户输入ID", ID_WORKER:"全局唯一ID (数字类型唯一ID)", UUID:"全局唯一ID UUID";id-type: AUTO # 字段策略 IGNORED:"忽略判断",NOT_NULL:"非 NULL 判断"),NOT_EMPTY:"非空判断"field-strategy: NOT_NULL # 驼峰下划线转换column-underline:true# 逻辑删除logic-delete-value:0logic-not-delete-value:1# 数据库类型db-type: mysql banner:false# mybatis原生配置configuration:map-underscore-to-camel-case:truecache-enabled:falsecall-setters-on-nulls:truejdbc-type-for-null:'null'type-handlers-package: com.wugui.datax.admin.core.handler# 配置mybatis-plus打印sql日志logging:level:com.wugui.datax.admin.mapper: infopath: ./data/applogs/admin# level:# com.wugui.datax.admin.mapper: error# path: ${data.path}/applogs/admin#datax-job, access tokendatax:job:accessToken:#i18n (default empty as chinese, "en" as english)i18n:## triggerpool max sizetriggerpool:fast:max:200slow:max:100### log retention dayslogretentiondays:30datasource:aes:key: AD42F6697B035B75
- datax-executor–>application.yml
# web portserver:# port: ${server.port}port:8081# log configlogging:config: classpath:logback.xml# path: ${data.path}/applogs/executor/jobhandlerpath: ./data/applogs/executor/jobhandlerdatax:job:admin:### datax admin address list, such as "http://address" or "http://address01,http://address02"addresses: http://127.0.0.1:8080# addresses: http://127.0.0.1:${datax.admin.port}executor:appname: datax-executor ip:port:9999# port: ${executor.port:9999}### job log pathlogpath: ./data/applogs/executor/jobhandler# logpath: ${data.path}/applogs/executor/jobhandler### job log retention dayslogretentiondays:30### job, access tokenaccessToken:executor:jsonpath: /Users/susu/datax_use/data/applogs# jsonpath: D:\\temp\\executor\\json\\# jsonpath: ${json.path}pypath: /Users/susu/study_down/about_datax/datax/bin/datax.py# pypath: F:\tools\datax\bin\datax.py# pypath: ${python.path}
2.3 初始化sql脚本、启动
- 下载的项目里有
datax_web.sql
文件,执行就行:/* Navicat Premium Data Transfer Source Server : localhost Source Server Type : MySQL Source Server Version : 50725 Source Host : localhost:3306 Source Schema : datax_web Target Server Type : MySQL Target Server Version : 50725 File Encoding : 65001 Date: 15/12/2019 22:27:10*/SET NAMES utf8mb4;SET FOREIGN_KEY_CHECKS =0;-- ------------------------------ Table structure for job_group-- ----------------------------DROPTABLEIFEXISTS`job_group`;CREATETABLE`job_group`(`id`int(11)NOTNULLAUTO_INCREMENT,`app_name`varchar(64)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NOTNULLCOMMENT'执行器AppName',`title`varchar(32)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NOTNULLCOMMENT'执行器名称',`order`int(11)NOTNULLDEFAULT0COMMENT'排序',`address_type`tinyint(4)NOTNULLDEFAULT0COMMENT'执行器地址类型:0=自动注册、1=手动录入',`address_list`varchar(512)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NULLDEFAULTNULLCOMMENT'执行器地址列表,多地址逗号分隔',PRIMARYKEY(`id`)USINGBTREE)ENGINE=InnoDBAUTO_INCREMENT=2CHARACTERSET= utf8mb4 COLLATE= utf8mb4_general_ci ROW_FORMAT = Dynamic;-- ------------------------------ Records of job_group-- ----------------------------INSERTINTO`job_group`VALUES(1,'datax-executor','datax执行器',1,0,NULL);-- ------------------------------ Table structure for job_info-- ----------------------------DROPTABLEIFEXISTS`job_info`;CREATETABLE`job_info`(`id`int(11)NOTNULLAUTO_INCREMENT,`job_group`int(11)NOTNULLCOMMENT'执行器主键ID',`job_cron`varchar(128)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NOTNULLCOMMENT'任务执行CRON',`job_desc`varchar(255)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NOTNULL,`add_time`datetime(0)NULLDEFAULTNULL,`update_time`datetime(0)NULLDEFAULTNULL,`author`varchar(64)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NULLDEFAULTNULLCOMMENT'作者',`alarm_email`varchar(255)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NULLDEFAULTNULLCOMMENT'报警邮件',`executor_route_strategy`varchar(50)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NULLDEFAULTNULLCOMMENT'执行器路由策略',`executor_handler`varchar(255)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NULLDEFAULTNULLCOMMENT'执行器任务handler',`executor_param`varchar(512)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NULLDEFAULTNULLCOMMENT'执行器任务参数',`executor_block_strategy`varchar(50)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NULLDEFAULTNULLCOMMENT'阻塞处理策略',`executor_timeout`int(11)NOTNULLDEFAULT0COMMENT'任务执行超时时间,单位秒',`executor_fail_retry_count`int(11)NOTNULLDEFAULT0COMMENT'失败重试次数',`glue_type`varchar(50)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NOTNULLCOMMENT'GLUE类型',`glue_source`mediumtextCHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NULLCOMMENT'GLUE源代码',`glue_remark`varchar(128)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NULLDEFAULTNULLCOMMENT'GLUE备注',`glue_updatetime`datetime(0)NULLDEFAULTNULLCOMMENT'GLUE更新时间',`child_jobid`varchar(255)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NULLDEFAULTNULLCOMMENT'子任务ID,多个逗号分隔',`trigger_status`tinyint(4)NOTNULLDEFAULT0COMMENT'调度状态:0-停止,1-运行',`trigger_last_time`bigint(13)NOTNULLDEFAULT0COMMENT'上次调度时间',`trigger_next_time`bigint(13)NOTNULLDEFAULT0COMMENT'下次调度时间',`job_json`textCHARACTERSET utf8 COLLATE utf8_general_ci NULLCOMMENT'datax运行脚本',PRIMARYKEY(`id`)USINGBTREE)ENGINE=InnoDBAUTO_INCREMENT=7CHARACTERSET= utf8mb4 COLLATE= utf8mb4_general_ci ROW_FORMAT = Dynamic;-- ------------------------------ Table structure for job_jdbc_datasource-- ----------------------------DROPTABLEIFEXISTS`job_jdbc_datasource`;CREATETABLE`job_jdbc_datasource`(`id`bigint(20)NOTNULLAUTO_INCREMENTCOMMENT'自增主键',`datasource_name`varchar(200)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NOTNULLCOMMENT'数据源名称',`datasource_group`varchar(200)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NULLDEFAULT'Default'COMMENT'数据源分组',`jdbc_username`varchar(100)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NOTNULLCOMMENT'用户名',`jdbc_password`varchar(200)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NOTNULLCOMMENT'密码',`jdbc_url`varchar(500)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NOTNULLCOMMENT'jdbc url',`jdbc_driver_class`varchar(200)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NULLDEFAULTNULLCOMMENT'jdbc驱动类',`status`tinyint(1)NOTNULLDEFAULT1COMMENT'状态:0删除 1启用 2禁用',`create_by`varchar(20)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NULLDEFAULTNULLCOMMENT'创建人',`create_date`datetime(0)NULLDEFAULTCURRENT_TIMESTAMP(0)COMMENT'创建时间',`update_by`varchar(20)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NULLDEFAULTNULLCOMMENT'更新人',`update_date`datetime(0)NULLDEFAULTNULLCOMMENT'更新时间',`comments`varchar(1000)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NULLDEFAULTNULLCOMMENT'备注',PRIMARYKEY(`id`)USINGBTREE)ENGINE=InnoDBAUTO_INCREMENT=6CHARACTERSET= utf8mb4 COLLATE= utf8mb4_general_ci COMMENT='jdbc数据源配置' ROW_FORMAT = Dynamic;-- ------------------------------ Table structure for job_lock-- ----------------------------DROPTABLEIFEXISTS`job_lock`;CREATETABLE`job_lock`(`lock_name`varchar(50)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NOTNULLCOMMENT'锁名称',PRIMARYKEY(`lock_name`)USINGBTREE)ENGINE=InnoDBCHARACTERSET= utf8mb4 COLLATE= utf8mb4_general_ci ROW_FORMAT = Dynamic;-- ------------------------------ Records of job_lock-- ----------------------------INSERTINTO`job_lock`VALUES('schedule_lock');-- ------------------------------ Table structure for job_log-- ----------------------------DROPTABLEIFEXISTS`job_log`;CREATETABLE`job_log`(`id`bigint(20)NOTNULLAUTO_INCREMENT,`job_group`int(11)NOTNULLCOMMENT'执行器主键ID',`job_id`int(11)NOTNULLCOMMENT'任务,主键ID',`job_desc`varchar(255)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NULLDEFAULTNULL,`executor_address`varchar(255)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NULLDEFAULTNULLCOMMENT'执行器地址,本次执行的地址',`executor_handler`varchar(255)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NULLDEFAULTNULLCOMMENT'执行器任务handler',`executor_param`varchar(512)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NULLDEFAULTNULLCOMMENT'执行器任务参数',`executor_sharding_param`varchar(20)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NULLDEFAULTNULLCOMMENT'执行器任务分片参数,格式如 1/2',`executor_fail_retry_count`int(11)NULLDEFAULT0COMMENT'失败重试次数',`trigger_time`datetime(0)NULLDEFAULTNULLCOMMENT'调度-时间',`trigger_code`int(11)NOTNULLCOMMENT'调度-结果',`trigger_msg`textCHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NULLCOMMENT'调度-日志',`handle_time`datetime(0)NULLDEFAULTNULLCOMMENT'执行-时间',`handle_code`int(11)NOTNULLCOMMENT'执行-状态',`handle_msg`textCHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NULLCOMMENT'执行-日志',`alarm_status`tinyint(4)NOTNULLDEFAULT0COMMENT'告警状态:0-默认、1-无需告警、2-告警成功、3-告警失败',`process_id`varchar(20)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NULLDEFAULTNULLCOMMENT'datax进程Id',`max_id`bigint(20)NULLDEFAULTNULLCOMMENT'增量表max id',PRIMARYKEY(`id`)USINGBTREE,INDEX`I_trigger_time`(`trigger_time`)USINGBTREE,INDEX`I_handle_code`(`handle_code`)USINGBTREE)ENGINE=InnoDBAUTO_INCREMENT=0CHARACTERSET= utf8mb4 COLLATE= utf8mb4_general_ci ROW_FORMAT = Dynamic;-- ------------------------------ Table structure for job_log_report-- ----------------------------DROPTABLEIFEXISTS`job_log_report`;CREATETABLE`job_log_report`(`id`int(11)NOTNULLAUTO_INCREMENT,`trigger_day`datetime(0)NULLDEFAULTNULLCOMMENT'调度-时间',`running_count`int(11)NOTNULLDEFAULT0COMMENT'运行中-日志数量',`suc_count`int(11)NOTNULLDEFAULT0COMMENT'执行成功-日志数量',`fail_count`int(11)NOTNULLDEFAULT0COMMENT'执行失败-日志数量',PRIMARYKEY(`id`)USINGBTREE,UNIQUEINDEX`i_trigger_day`(`trigger_day`)USINGBTREE)ENGINE=InnoDBAUTO_INCREMENT=28CHARACTERSET= utf8mb4 COLLATE= utf8mb4_general_ci ROW_FORMAT = Dynamic;-- ------------------------------ Records of job_log_report-- ----------------------------INSERTINTO`job_log_report`VALUES(20,'2019-12-07 00:00:00',0,0,0);INSERTINTO`job_log_report`VALUES(21,'2019-12-10 00:00:00',77,52,23);INSERTINTO`job_log_report`VALUES(22,'2019-12-11 00:00:00',9,2,11);INSERTINTO`job_log_report`VALUES(23,'2019-12-13 00:00:00',9,48,74);INSERTINTO`job_log_report`VALUES(24,'2019-12-12 00:00:00',10,8,30);INSERTINTO`job_log_report`VALUES(25,'2019-12-14 00:00:00',78,45,66);INSERTINTO`job_log_report`VALUES(26,'2019-12-15 00:00:00',24,76,9);INSERTINTO`job_log_report`VALUES(27,'2019-12-16 00:00:00',23,85,10);-- ------------------------------ Table structure for job_logglue-- ----------------------------DROPTABLEIFEXISTS`job_logglue`;CREATETABLE`job_logglue`(`id`int(11)NOTNULLAUTO_INCREMENT,`job_id`int(11)NOTNULLCOMMENT'任务,主键ID',`glue_type`varchar(50)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NULLDEFAULTNULLCOMMENT'GLUE类型',`glue_source`mediumtextCHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NULLCOMMENT'GLUE源代码',`glue_remark`varchar(128)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NOTNULLCOMMENT'GLUE备注',`add_time`datetime(0)NULLDEFAULTNULL,`update_time`datetime(0)NULLDEFAULTNULL,PRIMARYKEY(`id`)USINGBTREE)ENGINE=InnoDBAUTO_INCREMENT=1CHARACTERSET= utf8mb4 COLLATE= utf8mb4_general_ci ROW_FORMAT = Dynamic;-- ------------------------------ Table structure for job_registry-- ----------------------------DROPTABLEIFEXISTS`job_registry`;CREATETABLE`job_registry`(`id`int(11)NOTNULLAUTO_INCREMENT,`registry_group`varchar(50)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NOTNULL,`registry_key`varchar(191)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NOTNULL,`registry_value`varchar(191)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NOTNULL,`update_time`datetime(0)NULLDEFAULTNULL,PRIMARYKEY(`id`)USINGBTREE,INDEX`i_g_k_v`(`registry_group`,`registry_key`,`registry_value`)USINGBTREE)ENGINE=InnoDBAUTO_INCREMENT=26CHARACTERSET= utf8mb4 COLLATE= utf8mb4_general_ci ROW_FORMAT = Dynamic;-- ------------------------------ Table structure for job_user-- ----------------------------DROPTABLEIFEXISTS`job_user`;CREATETABLE`job_user`(`id`int(11)NOTNULLAUTO_INCREMENT,`username`varchar(50)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NOTNULLCOMMENT'账号',`password`varchar(100)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NOTNULLCOMMENT'密码',`role`varchar(50)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NULLDEFAULTNULLCOMMENT'角色:0-普通用户、1-管理员',`permission`varchar(255)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NULLDEFAULTNULLCOMMENT'权限:执行器ID列表,多个逗号分割',PRIMARYKEY(`id`)USINGBTREE,UNIQUEINDEX`i_username`(`username`)USINGBTREE)ENGINE=InnoDBAUTO_INCREMENT=10CHARACTERSET= utf8mb4 COLLATE= utf8mb4_general_ci ROW_FORMAT = Dynamic;-- ------------------------------ Records of job_user-- ----------------------------INSERTINTO`job_user`VALUES(1,'admin','$2a$10$2KCqRbra0Yn2TwvkZxtfLuWuUP5KyCWsljO/ci5pLD27pqR3TV1vy','ROLE_ADMIN',NULL);/**v2.1.1脚本更新*/ALTERTABLE`job_info`ADDCOLUMN`replace_param`VARCHAR(100)NULLDEFAULTNULLCOMMENT'动态参数'AFTER`job_json`,ADDCOLUMN`jvm_param`VARCHAR(200)NULLDEFAULTNULLCOMMENT'jvm参数'AFTER`replace_param`,ADDCOLUMN`time_offset`INT(11)NULLDEFAULT'0'COMMENT'时间偏移量'AFTER`jvm_param`;/**增量改版脚本更新 */ALTERTABLE`job_info`DROPCOLUMN`time_offset`;ALTERTABLE`job_info`ADDCOLUMN`inc_start_time`DATETIMENULLDEFAULTNULLCOMMENT'增量初始时间'AFTER`jvm_param`;-- ------------------------------ Table structure for job_template-- ----------------------------DROPTABLEIFEXISTS`job_template`;CREATETABLE`job_template`(`id`int(11)NOTNULLAUTO_INCREMENT,`job_group`int(11)NOTNULLCOMMENT'执行器主键ID',`job_cron`varchar(128)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NOTNULLCOMMENT'任务执行CRON',`job_desc`varchar(255)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NOTNULL,`add_time`datetime(0)NULLDEFAULTNULL,`update_time`datetime(0)NULLDEFAULTNULL,`user_id`int(11)NOTNULLCOMMENT'修改用户',`alarm_email`varchar(255)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NULLDEFAULTNULLCOMMENT'报警邮件',`executor_route_strategy`varchar(50)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NULLDEFAULTNULLCOMMENT'执行器路由策略',`executor_handler`varchar(255)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NULLDEFAULTNULLCOMMENT'执行器任务handler',`executor_param`varchar(512)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NULLDEFAULTNULLCOMMENT'执行器参数',`executor_block_strategy`varchar(50)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NULLDEFAULTNULLCOMMENT'阻塞处理策略',`executor_timeout`int(11)NOTNULLDEFAULT0COMMENT'任务执行超时时间,单位秒',`executor_fail_retry_count`int(11)NOTNULLDEFAULT0COMMENT'失败重试次数',`glue_type`varchar(50)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NOTNULLCOMMENT'GLUE类型',`glue_source`mediumtextCHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NULLCOMMENT'GLUE源代码',`glue_remark`varchar(128)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NULLDEFAULTNULLCOMMENT'GLUE备注',`glue_updatetime`datetime(0)NULLDEFAULTNULLCOMMENT'GLUE更新时间',`child_jobid`varchar(255)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NULLDEFAULTNULLCOMMENT'子任务ID,多个逗号分隔',`trigger_last_time`bigint(13)NOTNULLDEFAULT0COMMENT'上次调度时间',`trigger_next_time`bigint(13)NOTNULLDEFAULT0COMMENT'下次调度时间',`job_json`textCHARACTERSET utf8 COLLATE utf8_general_ci NULLCOMMENT'datax运行脚本',`jvm_param`varchar(200)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NULLDEFAULTNULLCOMMENT'jvm参数',`project_id`int(11)NULLDEFAULTNULLCOMMENT'所属项目Id',PRIMARYKEY(`id`)USINGBTREE)ENGINE=InnoDBAUTO_INCREMENT=22CHARACTERSET= utf8mb4 COLLATE= utf8mb4_general_ci ROW_FORMAT = Dynamic;/**添加数据源字段 */ALTERTABLE`job_jdbc_datasource`ADDCOLUMN`datasource`VARCHAR(45)NOTNULLCOMMENT'数据源'AFTER`datasource_name`;/**添加分区字段 */ALTERTABLE`job_info`ADDCOLUMN`partition_info`VARCHAR(100)NULLDEFAULTNULLCOMMENT'分区信息'AFTER`inc_start_time`;/**2.1.1版本新增---------------------------------------------------------------------------------------------- *//**最近一次执行状态 */ALTERTABLE`job_info`ADDCOLUMN`last_handle_code`INT(11)NULLDEFAULT'0'COMMENT'最近一次执行状态'AFTER`partition_info`;/**zookeeper地址 */ALTERTABLE`job_jdbc_datasource`ADDCOLUMN`zk_adress`VARCHAR(200)NULLDEFAULTNULLAFTER`jdbc_driver_class`;ALTERTABLE`job_info`CHANGE COLUMN`executor_timeout``executor_timeout`INT(11)NOTNULLDEFAULT'0'COMMENT'任务执行超时时间,单位分钟';/**用户名密码改为非必填 */ALTERTABLE`job_jdbc_datasource`CHANGE COLUMN`jdbc_username``jdbc_username`VARCHAR(100)CHARACTERSET'utf8mb4'NULLDEFAULTNULLCOMMENT'用户名',CHANGE COLUMN`jdbc_password``jdbc_password`VARCHAR(200)CHARACTERSET'utf8mb4'NULLDEFAULTNULLCOMMENT'密码';/**添加mongodb数据库名字段 */ALTERTABLE`job_jdbc_datasource`ADDCOLUMN`database_name`VARCHAR(45)NULLDEFAULTNULLCOMMENT'数据库名'AFTER`datasource_group`;/**添加执行器资源字段 */ALTERTABLE`job_registry`ADDCOLUMN`cpu_usage`DOUBLENULLAFTER`registry_value`,ADDCOLUMN`memory_usage`DOUBLENULLAFTER`cpu_usage`,ADDCOLUMN`load_average`DOUBLENULLAFTER`memory_usage`;-- ------------------------------ Table structure for job_permission-- ----------------------------DROPTABLEIFEXISTS`job_permission`;CREATETABLE`job_permission`(`id`int(11)NOTNULLAUTO_INCREMENTCOMMENT'主键',`name`varchar(50)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NOTNULLCOMMENT'权限名',`description`varchar(11)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NULLDEFAULTNULLCOMMENT'权限描述',`url`varchar(255)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NULLDEFAULTNULL,`pid`int(11)NULLDEFAULTNULL,PRIMARYKEY(`id`)USINGBTREE)ENGINE=InnoDBAUTO_INCREMENT=3CHARACTERSET= utf8mb4 COLLATE= utf8mb4_general_ci ROW_FORMAT = Dynamic;ALTERTABLE`job_info`ADDCOLUMN`replace_param_type`varchar(255)NULLCOMMENT'增量时间格式'AFTER`last_handle_code`;ALTERTABLE`job_info`ADDCOLUMN`project_id`int(11)NULLCOMMENT'所属项目id'AFTER`job_desc`;ALTERTABLE`job_info`ADDCOLUMN`reader_table`VARCHAR(255)NULLCOMMENT'reader表名称'AFTER`replace_param_type`,ADDCOLUMN`primary_key`VARCHAR(50)NULLCOMMENT'增量表主键'AFTER`reader_table`,ADDCOLUMN`inc_start_id`VARCHAR(20)NULLCOMMENT'增量初始id'AFTER`primary_key`,ADDCOLUMN`increment_type`TINYINT(4)NULLCOMMENT'增量类型'AFTER`inc_start_id`,ADDCOLUMN`datasource_id`BIGINT(11)NULLCOMMENT'数据源id'AFTER`increment_type`;CREATETABLE`job_project`(`id`int(11)NOTNULLAUTO_INCREMENTCOMMENT'key',`name`varchar(100)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NULLDEFAULTNULLCOMMENT'project name',`description`varchar(200)CHARACTERSET utf8mb4 COLLATE utf8mb4_general_ci NULLDEFAULTNULL,`user_id`int(11)NULLDEFAULTNULLCOMMENT'creator id',`flag`tinyint(4)NULLDEFAULT1COMMENT'0 not available, 1 available',`create_time`datetime(0)NULLDEFAULTCURRENT_TIMESTAMP(0)COMMENT'create time',`update_time`datetime(0)NULLDEFAULTCURRENT_TIMESTAMP(0)COMMENT'update time',PRIMARYKEY(`id`)USINGBTREE)ENGINE=InnoDBAUTO_INCREMENT=1CHARACTERSET= utf8mb4 COLLATE= utf8mb4_general_ci ROW_FORMAT = Dynamic;ALTERTABLE`job_info`CHANGE COLUMN`author``user_id`INT(11)NOTNULLCOMMENT'修改用户';ALTERTABLE`job_info`CHANGE COLUMN`increment_type``increment_type`TINYINT(4)NULLDEFAULT0COMMENT'增量类型';
2.4 登录
- 地址:
http://localhost:8080/index.html#/dashboard
- 默认管理员用户名:admin 密码:123456
3. 其他说明
3.1 python安装
- 通过官网下载安装 - 官网地址:https://www.python.org/downloads/.- 参考:python-01(入门基础篇). 通过这种方式安装会自动添加环境变量。
- 通过homebrew安装
3.2 问题
- 如果遇到下面的问题:
Cannot run program "python": error=2,No such file or directory
- 解决问题: - 如果安装的是python3,换一下命令,把
python
换成python3
(我的是Mac版的,其他的不清楚): - 或者查看一下环境变量是否配置。
本文转载自: https://blog.csdn.net/suixinfeixiangfei/article/details/140034833
版权归原作者 @素素~ 所有, 如有侵权,请联系我们删除。
版权归原作者 @素素~ 所有, 如有侵权,请联系我们删除。