在idea中启动Datax-web

需要先将Datax在本地安装,可以参考这篇文章(datax在win10中的安装

1.从github上拉取源码

https://github.com/WeiYe-Jing/datax-web

2.在本地的mysql数据库中执行脚本文件创建数据库

2.1.修改脚本文件

增加两行代码

CREATE DATABASE datax_web;
USE datax_web;

2.2.在数据库中执行datax_web.sql脚本,生成datax_web库

3.修改配置文件

3.1.修改datax_admin下resources/application.yml文件

下面的代码可以直接覆盖本地的(注意修改为自己的mysql账户名和密码)

# 端口号
server:
port: 8080
spring:
#数据源,目前仅仅支持Mysql
datasource:
username: root
password: 'root'
url: jdbc:mysql://127.0.0.1:3306/datax_web?serverTimezone=Asia/Shanghai&useLegacyDatetimeCode=false&useSSL=false&nullNamePatternMatchesAll=true&useUnicode=true&characterEncoding=UTF-8
driver-class-name: com.mysql.jdbc.Driver # 数据库连接池配置
hikari:
## 最小空闲连接数量
minimum-idle: 5
## 空闲连接存活最大时间,默认600000(10分钟)
idle-timeout: 180000
## 连接池最大连接数,默认是10
maximum-pool-size: 10
## 数据库连接超时时间,默认30秒,即30000
connection-timeout: 30000
connection-test-query: SELECT 1
##此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认1800000即30分钟
max-lifetime: 1800000 # datax-web email 不需要可以不用配置
mail:
host: smtp.qq.com
port: 25
username:
password:
properties:
mail:
smtp:
auth: true
starttls:
enable: true
required: true
socketFactory:
class: javax.net.ssl.SSLSocketFactory management:
health:
mail:
enabled: false
server:
servlet:
context-path: /actuator mybatis-plus:
# mapper.xml文件扫描
mapper-locations: classpath*:/mybatis-mapper/*Mapper.xml
# 实体扫描,多个package用逗号或者分号分隔
#typeAliasesPackage: com.yibo.essyncclient.*.entity
global-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: 0
logic-not-delete-value: 1
# 数据库类型
db-type: mysql
banner: false
# mybatis原生配置
configuration:
map-underscore-to-camel-case: true
cache-enabled: false
call-setters-on-nulls: true
jdbc-type-for-null: 'null'
type-handlers-package: com.wugui.datax.admin.core.handler # 配置mybatis-plus打印sql日志
logging:
level:
com.wugui.datax.admin.mapper: error
path: ./data/applogs/admin #datax-job, access token
datax:
job:
accessToken:
#i18n (default empty as chinese, "en" as english)
i18n:
## triggerpool max size
triggerpool:
fast:
max: 200
slow:
max: 100
### log retention days
logretentiondays: 30 datasource:
aes:
key: AD42F6697B035B75

3.2.修改datax_executor下resources/application.yml文件

下面的代码可以直接覆盖本地

# web port
server:
#port: ${server.port}
port: 8081 # 日志路径
logging:
config: classpath:logback.xml
path: ./data/applogs/executor/jobhandler datax:
job:
admin:
### datax admin address list, http://address01,http://address02",data-admin的地址
addresses: http://127.0.0.1:8080
executor:
appname: datax-executor # 创建执行器时的AppName需要和这里保持一致
ip:
port: 9999 # 执行器端口号
### job log path job文件的执行日志
logpath: ./data/applogs/executor/jobhandler
### job log retention days
logretentiondays: 30
### job, access token
accessToken: executor:
# datax json临时文件保存路径
jsonpath: E:\datax\datax-web\temp\executor
#jsonpath: ${json.path} # Datax执行文件datax.py的地址
pypath: E:\datax\datax\bin\datax.py
#pypath: ${python.path}

4.启动

运行datax_admin下 的DataXAdminApplication

运行datax_executor下 的DataXExecutorApplication

首次启动后,之后的启动可以直接选择左下角的spring boot启动

启动成功

三个地址,两个接口文档地址,一个前端页面地址

5.配置hadoop

一般情况下,在启动后,控制台会报缺少hadoop的错误

需要配置hadoop的环境变量

https://github.com/srccodes/hadoop-common-2.2.0-bin

下载压缩包后,解压即可

配置环境变量

HADOOP_HOME

E:\hadoop\hadoop-common-2.2.0-bin-master

%HADOOP_HOME%/bin

环境变量配置后,再次启动Datax-web就不再有报错

最新文章

  1. windowsphone 的IsolatedStorageSettings存储类型
  2. AngularJs bower install 卡主不动解决办法
  3. ACM/ICPC 之 平面几何-两直线关系(POJ 1269)
  4. Hadoop学习笔记(老版本,YARN之前),MapReduce任务Namenode DataNode Jobtracker Tasktracker之间的关系
  5. Spring(四)Bean注入方试
  6. The world beyond batch: Streaming 101
  7. strcpy and memcpy
  8. 理解 bashrc 和 profile(转)
  9. inno setup 1
  10. python爬虫--自动获取seebug的poc
  11. 准备:新V8即将到来,Node.js的性能正在改变
  12. websocket使用指南
  13. 引用变量&和指针*的区别
  14. dup(dup2/dup3)
  15. 学习记录特别篇之sql,类的继承
  16. laravel5.4中验证与错误提示设置
  17. Unable to cast COM object of type 'Shell32.ShellClass' to interface type 'Shell32.IShellDispatch6'.
  18. greenplum
  19. CKfinder for java详解二:缩略图及图片上传的缩放
  20. Ubuntu 14.04TLS Nginx搭建静态文件服务器

热门文章

  1. 推荐一款在浏览器编辑`Blazor`的`IDE`
  2. SOFAJRaft源码阅读-ShutdownHook如何优雅的停机
  3. SpringBoot学习笔记 - 构建、简化原理、快速启动、配置文件与多环境配置、技术整合案例
  4. .Net 7 高端玩法,自定义一个CLR运行时
  5. BIGO 如何做到夜间同时运行 2.4K 个工作流实例?
  6. react 高效高质量搭建后台系统 系列 —— 表格的封装
  7. 无法从“System.ReadOnlyMemory<byte>”转换为“byte[]”
  8. ctfshow_web入门 sql注入(web171~248)
  9. FTP客户端c代码功能实现
  10. async异步编程屏蔽凡人