配置文件说明

注:本文只对部分可能需要修改的重要配置进行说明

# 端口说明

数据质量后端服务

配置文件 配置端口 说明
application.properties server.port=28091 质量后端的端口
spring.redis.host=127.0.0.1 Redis 地址
spring.redis.port=6379 Redis 端口
application-afc.properties afc.application.name=127.0.0.1:28083
afc.application.name=AFCENTER
对应AFC的地址:端口,或者AFC服务名称(如果使用网关配置,可以直接使用服务名,默认为AFCENTER)
application-nacos.properties spring.cloud.nacos.discovery.server-addr=127.0.0.1:8848 nacos 地址:端口
application-dqms.properties xxl.job.admin.addresses=http://127.0.0.1:28093/job-admin/ scheduler [调度器] 的地址
数据质量调度器服务
配置文件 配置端口 说明
application.properties server.port=28093 scheduler [调度器] 的端口

数据质量执行器服务

配置文件 配置端口 说明
application.properties server.port=28092 executor [执行器] 的端口
xxl.job.admin.addresses=http://127.0.0.1:28093/job-admin/ executor [执行器] 要注册的调度器地址
xxl.job.executor.port=28094 executor [执行器] 注册调度器端口(注:与 server.port 保持不同)
afc.server.url=http://127.0.0.1:28083 对应AFC的地址:端口

# 质量后端

# user-config.xml 配置文件

数据质量的数据源使用 user-config.xml 配置文件进行配置。

配置文件路径:${PACKAGE_HOME}/server/quality/config/QUALITY/config/user-config.xml,内容如下:

...
<group name="default">
    <!--数据库名称,根据实际情况选择MySql/Oracle/DM/Openguass-->
    <configValue key="Database-Type">MySql</configValue>
    <configValue key="Jdbc-Type"/>
<!--
	数据库驱动,根据实际情况选择
	com.mysql.jdbc.Driver/oracle.jdbc.OracleDriver/
	dm.jdbc.driver.DmDriver/org.opengauss.Driver
-->
    <configValue key="C3p0-DriverClass">com.mysql.jdbc.Driver</configValue>
<!--
	数据库连接地址,按实际情况填写
	<configValue key="C3p0-Url">jdbc:mysql://127.0.0.1:3306/quality_pub?useSSL=false</configValue>
	<configValue key="C3p0-Url">jdbc:oracle:thin:@127.0.0.1:1521:eos</configValue>
	<configValue key="C3p0-Url">jdbc:dm://127.0.0.1:5236/schema?columnNameUpperCase=false</configValue>
	<configValue key="C3p0-Url">jdbc:opengauss://127.0.0.1:15400/quality_pub?currentSchema=public</configValue>
-->
    <configValue key="C3p0-Url">jdbc:mysql://127.0.0.1:3306/quality_pub?useSSL=false</configValue>
    <configValue key="C3p0-UserName">账号</configValue>
    <configValue key="C3p0-Password">密码</configValue>
    <configValue key="C3p0-PoolSize">5</configValue>
    <configValue key="C3p0-MaxPoolSize">30</configValue>
    <configValue key="C3p0-MinPoolSize">5</configValue>

    <!-- //seconds, 0 means connections never expire -->
    <configValue key="C3p0-MaxIdleTime">0</configValue>
    <!-- //idle connections never tested -->
    <configValue key="C3p0-IdleConnectionTestPeriod">0</configValue>
    <configValue key="C3p0-MaxStatements">0</configValue>
    <configValue key="C3p0-NumHelperThreads">3</configValue>

    <configValue key="Transaction-Isolation">ISOLATION_DEFAULT</configValue>
    <configValue key="Test-Connect-Sql">SELECT count(*) from EOS_UNIQUE_TABLE</configValue>
    <configValue key="Retry-Connect-Count">-1</configValue>
</group>
...

其中,default数据源为数据质量数据源(如果是集成式部署,也作为AFCenter的数据源)。

# application.properties 配置文件

application.properties 为spring通用配置,配置文件路径:

配置文件路径:${PACKAGE_HOME}/server/quality/config/application.properties,配置文件说明:

#应用端口
server.port=28091

#质量缓存配置,可选 [ redis | map ]
eos.cache.mode=map

#redis
spring.redis.host=127.0.0.1
spring.redis.port=6379
spring.redis.password=密码

# application-afc.properties 配置文件

application-afc.properties 为AFCenter的配置文件。

配置文件路径:${PACKAGE_HOME}/server/quality/config/application-afc.properties,配置文件说明:

# 如果使用nacos或eureka时,配置为应用名称,如:AFCENTER;否则填写格式为:ip:port
afc.application.name=127.0.0.1:28083
afc.application.tenant=sys_tenant
afc.application.app-code=AFC
afc.application.app-secret=secret

# application-dqms.properties 配置文件

application-dqms.properties 为数据质量的配置文件。配置文件路径:

配置文件路径:${PACKAGE_HOME}/server/quality/config/application-dqms.properties,配置文件说明:

#mybatis
#mybatis.mapper-dir=mysql	#mapper文件目录,根据实际情况选择,目前支持 mysql/oracle/dm/openguass
#mapper.identity=MYSQL		#tk-mybatis主键自增数据指定,根据实际情况选择 MYSQL/ORACLE/DM/POSTGRESQL(openguass使用)
pagehelper.helperDialect=mysql	#pagehelper方言,根据实际情况选择 MYSQL/ORACLE/DM/postgresql(openguass使用)

#dqms
common.base_dir=${app.home:.}	#文件生成基础目录(上传文件、检核结果等),默认当前质量后端安装目录


#xxl
xxl.job.admin.addresses=http://127.0.0.1:28093/job-admin/	#调度器地址
xxl.job.admin.username=admin
xxl.job.admin.password=123456

#hadoop
hadoop.hdfs_type=local	#hadoop 集群配置,如果是真实的 HDFS,则配置为:cluster, 如果不是:local
#hadoop.tenent_name=hadoop	#按实际情况修改

# 文件存储位置
datashard.type=local	# 支持 local、ftp、sftp、hdfs
datashard.base_path=${common.base_dir}/upload	#Local,HDFS 等文件系统的基础路径
datashard.delSrc=true	#上传后是否删除源文件
datashard.fileSuffix=.bcp	#数据文件后缀
#ftp
datashard.ftp.host=192.168.30.142
datashard.ftp.port=2121
datashard.ftp.userName=admin
datashard.ftp.password=primeton000000
#sftp
datashard.sftp.host=192.168.30.143
datashard.sftp.port=22
datashard.sftp.userName=root
datashard.sftp.password=primeton

#数据源同步
#sync.ds-datasource=true	#默认开启
#sync.ds-datasource.interval=0 */5 * * * ?	#同步时间默认5min

更多配置请参考EOS配置文件说明 (opens new window)

# 调度器

# application.properties 配置文件

application.properties 为数据质量的配置文件。配置文件路径:

${PACKAGE_HOME}/server/scheduler/config/application.properties,配置文件说明:

#web
server.port=28093

## xxl-job, datasource
#mysql
#数据库连接地址,按实际情况填写
#spring.datasource.url=jdbc:oracle:thin:@127.0.0.1:1521:eos
#spring.datasource.url=jdbc:dm://127.0.0.1:5236/schema?columnNameUpperCase=false
#spring.datasource.url=jdbc:opengauss://127.0.0.1:15400/quality_pub?currentSchema=public
#spring.datasource.url=jdbc:mysql://127.0.0.1:3306/quality_pub?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&serverTimezone=Asia/Shanghai
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/quality_pub?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&serverTimezone=Asia/Shanghai
spring.datasource.username=账号
spring.datasource.password=密码
#数据库驱动,根据实际情况选择					    com.mysql.jdbc.Driver/oracle.jdbc.OracleDriver/dm.jdbc.driver.DmDriver/org.opengauss.Driver
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver

#oracle
#spring.datasource.url=jdbc:oracle:thin:@127.0.0.1:1521:eos
#spring.datasource.username=账号
#spring.datasource.password=密码
#spring.datasource.driver-class-name=oracle.jdbc.OracleDriver

#dm
spring.datasource.url=jdbc:dm://127.0.0.1:5236/quality_pub
spring.datasource.username=账号
spring.datasource.password=密码
spring.datasource.driver-class-name=dm.jdbc.driver.DmDriver

#gauss
#spring.datasource.url=jdbc:opengauss://127.0.0.1:15400/quality_pub?currentSchema=public
#spring.datasource.username=账号
#spring.datasource.password=密码
#spring.datasource.driver-class-name=org.opengauss.Driver

# 执行器

# application.propertiel 配置文件

application.properties 为数据质量的配置文件。配置文件路径:

${PACKAGE_HOME}/server/executor/config/application.properties,配置文件说明:

#执行器端口
server.port=28092

#使用的数据库类型
mybatis.configuration.database-id=mysql

#base文件路径(!!!需要和quality后端配置的base文件在同一个地方)
# \u6267\u884C\u5668\u5B89\u88C5\u7684\u76EE\u5F55\uFF0C\u53EF\u65E0\u9700\u4FEE\u6539
common.base_dir=/base文件路径
# DAMP \u5B89\u88C5\u7684\u76EE\u5F55\uFF0C\u6309\u9700\u4FEE\u6539
common.damp_dir=/base文件路径

#告警邮件服务器配置
spring.mail.host=smtp.exmail.qq.com
spring.mail.protocol=smtp
spring.mail.username=lizw@primeton.com
spring.mail.password=i7cBHaDFzeWex539

#数据库配置
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/quality_pub?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=GMT%2b8
spring.datasource.username=账号
spring.datasource.password=密码
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
#使用的数据库类型
pagehelper.helperDialect=mysql

# xxl-job
#executor [执行器] 要注册的调度器地址
xxl.job.admin.addresses=http://127.0.0.1:28053/job-admin/
#executor [执行器] 要注册的调度器账号(admin为默认账户)
xxl.job.admin.username=admin
#executor [执行器] 要注册的调度器密码
xxl.job.admin.password=123456
xxl.job.executor.appname=cdh-executor
xxl.job.executor.ip=
#executor [执行器] 注册调度器端口(注:与 server.port 保持不同)
xxl.job.executor.port=28094
# afcenter地址
afc.server.url=http://127.0.0.1:28083   

#hadoop
# hadoop 集群配置,如果是真实的 HDFS,则配置为:cluster, 如果不是:local
hadoop.hdfs_type=local 
# 支持 local、ftp、sftp、hdfs
datashard.type=local
datashard.base_path=${common.base_dir}/upload
#上传文件到hadoop后删除源文件
datashard.delSrc=true
#上传文件后缀
datashard.fileSuffix=.bcp

#ftp
datashard.ftp.host=localhost
datashard.ftp.port=21
datashard.ftp.userName=admin
datashard.ftp.password=primeton000000

#sftp
# ip地址
datashard.sftp.host=localhost
# 端口
datashard.sftp.port=22
# 用户名
datashard.sftp.userName: root
# 密码
datashard.sftp.password: primeton

# 检核空值时是否包括空字符串
#true means null-value-check will check blank values
datacheck.check-rules.null-value-check.include-blank-value=true