在 docker中运行 datax_web(无坑版本)

打印 上一主题 下一主题

主题 671|帖子 671|积分 2013

Datax_web容器运行

1、准备 mysql 环境

mysql:8.036
  2、准备映射文件


  • 准备bootstrap.properties
    在宿主机创建//Users/kunhuang/data/docker/datax/datax-admin/conf目录(随意即可),并将bootstrap.properties拷贝到/home/datax/datax-admin/conf目录下,该文件用来设置datax-web连接数据库的信息,ip地点和xxxxxx必要按现实情况填写。xxxxxx的值要与第3步骤中设置的密码保持同等。
    1.     create database datax_web_db default character set utf8mb4 collate utf8mb4_general_ci;
    2.     create user 'datax_web'@'%' identified with mysql_native_password by 'xxxxxx';
    3.     grant all privileges on datax_web_db.* to 'datax_web'@'%';
    4.     flush privileges;
    复制代码
  • 准备core.json
    在宿主机创建//Users/kunhuang/data/docker/datax/datax-admin/conf目录(随意即可),并将core.json拷贝到//home/datax/datax/conf目录下,该文件用来设置datax运行信息。
    1. /*
    2. Navicat Premium Data Transfer
    3. Source Server         : localhost
    4. Source Server Type    : MySQL
    5. Source Server Version : 50725
    6. Source Host           : localhost:3306
    7. Source Schema         : datax_web
    8. Target Server Type    : MySQL
    9. Target Server Version : 50725
    10. File Encoding         : 65001
    11. Date: 15/12/2019 22:27:10
    12. */
    13. SET NAMES utf8mb4;
    14. SET FOREIGN_KEY_CHECKS = 0;
    15. -- ----------------------------
    16. -- Table structure for job_group
    17. -- ----------------------------
    18. DROP TABLE IF EXISTS `job_group`;
    19. CREATE TABLE `job_group`  (
    20.   `id` int(11) NOT NULL AUTO_INCREMENT,
    21.   `app_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '执行器AppName',
    22.   `title` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '执行器名称',
    23.   `order` int(11) NOT NULL DEFAULT 0 COMMENT '排序',
    24.   `address_type` tinyint(4) NOT NULL DEFAULT 0 COMMENT '执行器地址类型:0=自动注册、1=手动录入',
    25.   `address_list` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
    26.   PRIMARY KEY (`id`) USING BTREE
    27. ) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
    28. -- ----------------------------
    29. -- Records of job_group
    30. -- ----------------------------
    31. INSERT INTO `job_group` VALUES (1, 'datax-executor', 'datax执行器', 1, 0, NULL);
    32. -- ----------------------------
    33. -- Table structure for job_info
    34. -- ----------------------------
    35. DROP TABLE IF EXISTS `job_info`;
    36. CREATE TABLE `job_info`  (
    37.   `id` int(11) NOT NULL AUTO_INCREMENT,
    38.   `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
    39.   `job_cron` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '任务执行CRON',
    40.   `job_desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
    41.   `add_time` datetime(0) NULL DEFAULT NULL,
    42.   `update_time` datetime(0) NULL DEFAULT NULL,
    43.   `author` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '作者',
    44.   `alarm_email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '报警邮件',
    45.   `executor_route_strategy` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执行器路由策略',
    46.   `executor_handler` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执行器任务handler',
    47.   `executor_param` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执行器任务参数',
    48.   `executor_block_strategy` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '阻塞处理策略',
    49.   `executor_timeout` int(11) NOT NULL DEFAULT 0 COMMENT '任务执行超时时间,单位秒',
    50.   `executor_fail_retry_count` int(11) NOT NULL DEFAULT 0 COMMENT '失败重试次数',
    51.   `glue_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'GLUE类型',
    52.   `glue_source` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT 'GLUE源代码',
    53.   `glue_remark` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'GLUE备注',
    54.   `glue_updatetime` datetime(0) NULL DEFAULT NULL COMMENT 'GLUE更新时间',
    55.   `child_jobid` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '子任务ID,多个逗号分隔',
    56.   `trigger_status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '调度状态:0-停止,1-运行',
    57.   `trigger_last_time` bigint(13) NOT NULL DEFAULT 0 COMMENT '上次调度时间',
    58.   `trigger_next_time` bigint(13) NOT NULL DEFAULT 0 COMMENT '下次调度时间',
    59.   `job_json` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT 'datax运行脚本',
    60.   PRIMARY KEY (`id`) USING BTREE
    61. ) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
    62. -- ----------------------------
    63. -- Table structure for job_jdbc_datasource
    64. -- ----------------------------
    65. DROP TABLE IF EXISTS `job_jdbc_datasource`;
    66. CREATE TABLE `job_jdbc_datasource`  (
    67.   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增主键',
    68.   `datasource_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '数据源名称',
    69.   `datasource_group` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'Default' COMMENT '数据源分组',
    70.   `jdbc_username` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户名',
    71.   `jdbc_password` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '密码',
    72.   `jdbc_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'jdbc url',
    73.   `jdbc_driver_class` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'jdbc驱动类',
    74.   `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态:0删除 1启用 2禁用',
    75.   `create_by` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
    76.   `create_date` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
    77.   `update_by` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
    78.   `update_date` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
    79.   `comments` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
    80.   PRIMARY KEY (`id`) USING BTREE
    81. ) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = 'jdbc数据源配置' ROW_FORMAT = Dynamic;
    82. -- ----------------------------
    83. -- Table structure for job_lock
    84. -- ----------------------------
    85. DROP TABLE IF EXISTS `job_lock`;
    86. CREATE TABLE `job_lock`  (
    87.   `lock_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '锁名称',
    88.   PRIMARY KEY (`lock_name`) USING BTREE
    89. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
    90. -- ----------------------------
    91. -- Records of job_lock
    92. -- ----------------------------
    93. INSERT INTO `job_lock` VALUES ('schedule_lock');
    94. -- ----------------------------
    95. -- Table structure for job_log
    96. -- ----------------------------
    97. DROP TABLE IF EXISTS `job_log`;
    98. CREATE TABLE `job_log`  (
    99.   `id` bigint(20) NOT NULL AUTO_INCREMENT,
    100.   `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
    101.   `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
    102.   `job_desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
    103.   `executor_address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
    104.   `executor_handler` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执行器任务handler',
    105.   `executor_param` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执行器任务参数',
    106.   `executor_sharding_param` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执行器任务分片参数,格式如 1/2',
    107.   `executor_fail_retry_count` int(11) NULL DEFAULT 0 COMMENT '失败重试次数',
    108.   `trigger_time` datetime(0) NULL DEFAULT NULL COMMENT '调度-时间',
    109.   `trigger_code` int(11) NOT NULL COMMENT '调度-结果',
    110.   `trigger_msg` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '调度-日志',
    111.   `handle_time` datetime(0) NULL DEFAULT NULL COMMENT '执行-时间',
    112.   `handle_code` int(11) NOT NULL COMMENT '执行-状态',
    113.   `handle_msg` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '执行-日志',
    114.   `alarm_status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '告警状态:0-默认、1-无需告警、2-告警成功、3-告警失败',
    115.   `process_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'datax进程Id',
    116.   `max_id` bigint(20) NULL DEFAULT NULL COMMENT '增量表max id',
    117.   PRIMARY KEY (`id`) USING BTREE,
    118.   INDEX `I_trigger_time`(`trigger_time`) USING BTREE,
    119.   INDEX `I_handle_code`(`handle_code`) USING BTREE
    120. ) ENGINE = InnoDB AUTO_INCREMENT = 0 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
    121. -- ----------------------------
    122. -- Table structure for job_log_report
    123. -- ----------------------------
    124. DROP TABLE IF EXISTS `job_log_report`;
    125. CREATE TABLE `job_log_report`  (
    126.   `id` int(11) NOT NULL AUTO_INCREMENT,
    127.   `trigger_day` datetime(0) NULL DEFAULT NULL COMMENT '调度-时间',
    128.   `running_count` int(11) NOT NULL DEFAULT 0 COMMENT '运行中-日志数量',
    129.   `suc_count` int(11) NOT NULL DEFAULT 0 COMMENT '执行成功-日志数量',
    130.   `fail_count` int(11) NOT NULL DEFAULT 0 COMMENT '执行失败-日志数量',
    131.   PRIMARY KEY (`id`) USING BTREE,
    132.   UNIQUE INDEX `i_trigger_day`(`trigger_day`) USING BTREE
    133. ) ENGINE = InnoDB AUTO_INCREMENT = 28 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
    134. -- ----------------------------
    135. -- Records of job_log_report
    136. -- ----------------------------
    137. INSERT INTO `job_log_report` VALUES (20, '2019-12-07 00:00:00', 0, 0, 0);
    138. INSERT INTO `job_log_report` VALUES (21, '2019-12-10 00:00:00', 77, 52, 23);
    139. INSERT INTO `job_log_report` VALUES (22, '2019-12-11 00:00:00', 9, 2, 11);
    140. INSERT INTO `job_log_report` VALUES (23, '2019-12-13 00:00:00', 9, 48, 74);
    141. INSERT INTO `job_log_report` VALUES (24, '2019-12-12 00:00:00', 10, 8, 30);
    142. INSERT INTO `job_log_report` VALUES (25, '2019-12-14 00:00:00', 78, 45, 66);
    143. INSERT INTO `job_log_report` VALUES (26, '2019-12-15 00:00:00', 24, 76, 9);
    144. INSERT INTO `job_log_report` VALUES (27, '2019-12-16 00:00:00', 23, 85, 10);
    145. -- ----------------------------
    146. -- Table structure for job_logglue
    147. -- ----------------------------
    148. DROP TABLE IF EXISTS `job_logglue`;
    149. CREATE TABLE `job_logglue`  (
    150.   `id` int(11) NOT NULL AUTO_INCREMENT,
    151.   `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
    152.   `glue_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'GLUE类型',
    153.   `glue_source` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT 'GLUE源代码',
    154.   `glue_remark` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'GLUE备注',
    155.   `add_time` datetime(0) NULL DEFAULT NULL,
    156.   `update_time` datetime(0) NULL DEFAULT NULL,
    157.   PRIMARY KEY (`id`) USING BTREE
    158. ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
    159. -- ----------------------------
    160. -- Table structure for job_registry
    161. -- ----------------------------
    162. DROP TABLE IF EXISTS `job_registry`;
    163. CREATE TABLE `job_registry`  (
    164.   `id` int(11) NOT NULL AUTO_INCREMENT,
    165.   `registry_group` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
    166.   `registry_key` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
    167.   `registry_value` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
    168.   `update_time` datetime(0) NULL DEFAULT NULL,
    169.   PRIMARY KEY (`id`) USING BTREE,
    170.   INDEX `i_g_k_v`(`registry_group`, `registry_key`, `registry_value`) USING BTREE
    171. ) ENGINE = InnoDB AUTO_INCREMENT = 26 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
    172. -- ----------------------------
    173. -- Table structure for job_user
    174. -- ----------------------------
    175. DROP TABLE IF EXISTS `job_user`;
    176. CREATE TABLE `job_user`  (
    177.   `id` int(11) NOT NULL AUTO_INCREMENT,
    178.   `username` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '账号',
    179.   `password` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '密码',
    180.   `role` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '角色:0-普通用户、1-管理员',
    181.   `permission` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '权限:执行器ID列表,多个逗号分割',
    182.   PRIMARY KEY (`id`) USING BTREE,
    183.   UNIQUE INDEX `i_username`(`username`) USING BTREE
    184. ) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
    185. -- ----------------------------
    186. -- Records of job_user
    187. -- ----------------------------
    188. INSERT INTO `job_user` VALUES (1, 'admin', '$2a$10$2KCqRbra0Yn2TwvkZxtfLuWuUP5KyCWsljO/ci5pLD27pqR3TV1vy', 'ROLE_ADMIN', NULL);
    189. /**
    190. v2.1.1脚本更新
    191. */
    192. ALTER TABLE `job_info`
    193. ADD COLUMN `replace_param` VARCHAR(100) NULL DEFAULT NULL COMMENT '动态参数' AFTER `job_json`,
    194. ADD COLUMN `jvm_param` VARCHAR(200) NULL DEFAULT NULL COMMENT 'jvm参数' AFTER `replace_param`,
    195. ADD COLUMN `time_offset` INT(11) NULL DEFAULT '0'COMMENT '时间偏移量'  AFTER `jvm_param`;
    196. /**
    197. 增量改版脚本更新
    198. */
    199. ALTER TABLE `job_info` DROP COLUMN `time_offset`;
    200. ALTER TABLE `job_info`
    201. ADD COLUMN `inc_start_time` DATETIME NULL DEFAULT NULL COMMENT '增量初始时间' AFTER `jvm_param`;
    202. -- ----------------------------
    203. -- Table structure for job_template
    204. -- ----------------------------
    205. DROP TABLE IF EXISTS `job_template`;
    206. CREATE TABLE `job_template`  (
    207.   `id` int(11) NOT NULL AUTO_INCREMENT,
    208.   `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
    209.   `job_cron` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '任务执行CRON',
    210.   `job_desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
    211.   `add_time` datetime(0) NULL DEFAULT NULL,
    212.   `update_time` datetime(0) NULL DEFAULT NULL,
    213.   `user_id` int(11) NOT NULL COMMENT '修改用户',
    214.   `alarm_email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '报警邮件',
    215.   `executor_route_strategy` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执行器路由策略',
    216.   `executor_handler` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执行器任务handler',
    217.   `executor_param` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执行器参数',
    218.   `executor_block_strategy` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '阻塞处理策略',
    219.   `executor_timeout` int(11) NOT NULL DEFAULT 0 COMMENT '任务执行超时时间,单位秒',
    220.   `executor_fail_retry_count` int(11) NOT NULL DEFAULT 0 COMMENT '失败重试次数',
    221.   `glue_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'GLUE类型',
    222.   `glue_source` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT 'GLUE源代码',
    223.   `glue_remark` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'GLUE备注',
    224.   `glue_updatetime` datetime(0) NULL DEFAULT NULL COMMENT 'GLUE更新时间',
    225.   `child_jobid` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '子任务ID,多个逗号分隔',
    226.   `trigger_last_time` bigint(13) NOT NULL DEFAULT 0 COMMENT '上次调度时间',
    227.   `trigger_next_time` bigint(13) NOT NULL DEFAULT 0 COMMENT '下次调度时间',
    228.   `job_json` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT 'datax运行脚本',
    229.   `jvm_param` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'jvm参数',
    230.   `project_id` int(11) NULL DEFAULT NULL COMMENT '所属项目Id',
    231.   PRIMARY KEY (`id`) USING BTREE
    232. ) ENGINE = InnoDB AUTO_INCREMENT = 22 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
    233. /**
    234. 添加数据源字段
    235. */
    236. ALTER TABLE `job_jdbc_datasource`
    237. ADD COLUMN `datasource` VARCHAR(45) NOT NULL COMMENT '数据源' AFTER `datasource_name`;
    238. /**
    239. 添加分区字段
    240. */
    241. ALTER TABLE `job_info`
    242. ADD COLUMN `partition_info` VARCHAR(100) NULL DEFAULT NULL COMMENT '分区信息' AFTER `inc_start_time`;
    243. /**
    244. 2.1.1版本新增----------------------------------------------------------------------------------------------
    245. */
    246. /**
    247. 最近一次执行状态
    248. */
    249. ALTER TABLE `job_info`
    250. ADD COLUMN `last_handle_code` INT(11) NULL DEFAULT '0' COMMENT '最近一次执行状态' AFTER `partition_info`;
    251. /**
    252. zookeeper地址
    253. */
    254. ALTER TABLE `job_jdbc_datasource`
    255. ADD COLUMN `zk_adress` VARCHAR(200) NULL DEFAULT NULL AFTER `jdbc_driver_class`;
    256. ALTER TABLE `job_info`
    257. CHANGE COLUMN `executor_timeout` `executor_timeout` INT(11) NOT NULL DEFAULT '0' COMMENT '任务执行超时时间,单位分钟' ;
    258. /**
    259. 用户名密码改为非必填
    260. */
    261. ALTER TABLE `job_jdbc_datasource`
    262. CHANGE COLUMN `jdbc_username` `jdbc_username` VARCHAR(100) CHARACTER SET 'utf8mb4' NULL DEFAULT NULL COMMENT '用户名' ,
    263. CHANGE COLUMN `jdbc_password` `jdbc_password` VARCHAR(200) CHARACTER SET 'utf8mb4' NULL DEFAULT NULL COMMENT '密码' ;
    264. /**
    265. 添加mongodb数据库名字段
    266. */
    267. ALTER TABLE `job_jdbc_datasource`
    268. ADD COLUMN `database_name` VARCHAR(45) NULL DEFAULT NULL COMMENT '数据库名' AFTER `datasource_group`;
    269. /**
    270. 添加执行器资源字段
    271. */
    272. ALTER TABLE `job_registry`
    273. ADD COLUMN `cpu_usage` DOUBLE NULL AFTER `registry_value`,
    274. ADD COLUMN `memory_usage` DOUBLE NULL AFTER `cpu_usage`,
    275. ADD COLUMN `load_average` DOUBLE NULL AFTER `memory_usage`;
    276. -- ----------------------------
    277. -- Table structure for job_permission
    278. -- ----------------------------
    279. DROP TABLE IF EXISTS `job_permission`;
    280. CREATE TABLE `job_permission`  (
    281.   `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
    282.   `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '权限名',
    283.   `description` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '权限描述',
    284.   `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
    285.   `pid` int(11) NULL DEFAULT NULL,
    286.   PRIMARY KEY (`id`) USING BTREE
    287. ) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
    288. ALTER TABLE `job_info`
    289. ADD COLUMN `replace_param_type` varchar(255) NULL COMMENT '增量时间格式' AFTER `last_handle_code`;
    290. ALTER TABLE `job_info`
    291. ADD COLUMN `project_id` int(11) NULL COMMENT '所属项目id' AFTER `job_desc`;
    292. ALTER TABLE `job_info`
    293. ADD COLUMN `reader_table` VARCHAR(255) NULL COMMENT 'reader表名称' AFTER `replace_param_type`,
    294. ADD COLUMN `primary_key` VARCHAR(50) NULL COMMENT '增量表主键' AFTER `reader_table`,
    295. ADD COLUMN `inc_start_id` VARCHAR(20) NULL COMMENT '增量初始id' AFTER `primary_key`,
    296. ADD COLUMN `increment_type` TINYINT(4) NULL COMMENT '增量类型' AFTER `inc_start_id`,
    297. ADD COLUMN `datasource_id` BIGINT(11) NULL COMMENT '数据源id' AFTER `increment_type`;
    298. CREATE TABLE `job_project`  (
    299.   `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
    300.   `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'project name',
    301.   `description` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
    302.   `user_id` int(11) NULL DEFAULT NULL COMMENT 'creator id',
    303.   `flag` tinyint(4) NULL DEFAULT 1 COMMENT '0 not available, 1 available',
    304.   `create_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT 'create time',
    305.   `update_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT 'update time',
    306.   PRIMARY KEY (`id`) USING BTREE
    307. ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
    308. ALTER TABLE `job_info`
    309. CHANGE COLUMN `author` `user_id` INT(11) NOT NULL COMMENT '修改用户' ;
    310. ALTER TABLE `job_info`
    311. CHANGE COLUMN `increment_type` `increment_type` TINYINT(4) NULL DEFAULT 0 COMMENT '增量类型' ;
    复制代码
3、启动容器

docker pull linshellfeng/datax_web:3.0.1
  1. #Database 不能填 127.0.0.1
  2. DB_HOST=192.168.1.xx
  3. DB_PORT=3306
  4. DB_USERNAME=datax_web
  5. DB_PASSWORD=xxxxxx
  6. DB_DATABASE=datax_web_db
复制代码
进入容器内部(非须要步骤,用来测试datax_web容器是否正常启动)
docker exec -it datax_web /bin/bash
测试是否datax-web服务是否正常启动
在容器内:curl http://127.0.0.1:9527/index.html
利用浏览器访问宿主机服务:http://宿主机ip:9527/index.html
利用admin/123456登录
参考链接:https://blog.csdn.net/weixin_43991475/article/details/124733779

免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
回复

使用道具 举报

0 个回复

倒序浏览

快速回复

您需要登录后才可以回帖 登录 or 立即注册

本版积分规则

张裕

金牌会员
这个人很懒什么都没写!
快速回复 返回顶部 返回列表