application.properties 5.9 KB
Newer Older
B
bao liang 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

L
lgcareer 已提交
18 19
# base spring data source configuration
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
20
# postgre
B
bao liang 已提交
21
spring.datasource.driver-class-name=org.postgresql.Driver
Q
qiaozhanwei 已提交
22
spring.datasource.url=jdbc:postgresql://localhost:5432/dolphinscheduler
23
# mysql
B
bao liang 已提交
24 25
#spring.datasource.driver-class-name=com.mysql.jdbc.Driver
#spring.datasource.url=jdbc:mysql://192.168.xx.xx:3306/dolphinscheduler?useUnicode=true&characterEncoding=UTF-8
Q
qiaozhanwei 已提交
26 27
spring.datasource.username=test
spring.datasource.password=test
L
lgcareer 已提交
28 29

# connection configuration
B
bao liang 已提交
30
spring.datasource.initialSize=5
L
lgcareer 已提交
31
# min connection number
B
bao liang 已提交
32
spring.datasource.minIdle=5
L
lgcareer 已提交
33 34 35 36 37
# max connection number
spring.datasource.maxActive=50

# max wait time for get a connection in milliseconds. if configuring maxWait, fair locks are enabled by default and concurrency efficiency decreases.
# If necessary, unfair locks can be used by configuring the useUnfairLock attribute to true.
B
bao liang 已提交
38
spring.datasource.maxWait=60000
L
lgcareer 已提交
39 40

# milliseconds for check to close free connections
B
bao liang 已提交
41
spring.datasource.timeBetweenEvictionRunsMillis=60000
L
lgcareer 已提交
42 43 44 45 46

# the Destroy thread detects the connection interval and closes the physical connection in milliseconds if the connection idle time is greater than or equal to minEvictableIdleTimeMillis.
spring.datasource.timeBetweenConnectErrorMillis=60000

# the longest time a connection remains idle without being evicted, in milliseconds
B
bao liang 已提交
47
spring.datasource.minEvictableIdleTimeMillis=300000
L
lgcareer 已提交
48 49

#the SQL used to check whether the connection is valid requires a query statement. If validation Query is null, testOnBorrow, testOnReturn, and testWhileIdle will not work.
50
spring.datasource.validationQuery=SELECT 1
L
lgcareer 已提交
51 52 53 54 55 56

#check whether the connection is valid for timeout, in seconds
spring.datasource.validationQueryTimeout=3

# when applying for a connection, if it is detected that the connection is idle longer than time Between Eviction Runs Millis,
# validation Query is performed to check whether the connection is valid
B
bao liang 已提交
57
spring.datasource.testWhileIdle=true
L
lgcareer 已提交
58 59 60 61

#execute validation to check if the connection is valid when applying for a connection
spring.datasource.testOnBorrow=true
#execute validation to check if the connection is valid when the connection is returned
B
bao liang 已提交
62
spring.datasource.testOnReturn=false
L
lgcareer 已提交
63 64 65 66
spring.datasource.defaultAutoCommit=true
spring.datasource.keepAlive=true

# open PSCache, specify count PSCache for every connection
B
bao liang 已提交
67 68
spring.datasource.poolPreparedStatements=true
spring.datasource.maxPoolPreparedStatementPerConnectionSize=20
L
lgcareer 已提交
69

B
bao liang 已提交
70 71 72 73 74 75 76 77
spring.datasource.spring.datasource.filters=stat,wall,log4j
spring.datasource.connectionProperties=druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000

#mybatis
mybatis-plus.mapper-locations=classpath*:/org.apache.dolphinscheduler.dao.mapper/*.xml

mybatis-plus.typeEnumsPackage=org.apache.dolphinscheduler.*.enums

78
#Entity scan, where multiple packages are separated by a comma or semicolon
B
bao liang 已提交
79 80
mybatis-plus.typeAliasesPackage=org.apache.dolphinscheduler.dao.entity

81
#Primary key type AUTO:" database ID AUTO ", INPUT:" user INPUT ID", ID_WORKER:" global unique ID (numeric type unique ID)", UUID:" global unique ID UUID";
B
bao liang 已提交
82 83
mybatis-plus.global-config.db-config.id-type=AUTO

84
#Field policy IGNORED:" ignore judgment ",NOT_NULL:" not NULL judgment "),NOT_EMPTY:" not NULL judgment"
B
bao liang 已提交
85 86
mybatis-plus.global-config.db-config.field-strategy=NOT_NULL

87
#The hump underline is converted
B
bao liang 已提交
88 89 90 91
mybatis-plus.global-config.db-config.column-underline=true
mybatis-plus.global-config.db-config.logic-delete-value=-1
mybatis-plus.global-config.db-config.logic-not-delete-value=0
mybatis-plus.global-config.db-config.banner=false
92
#The original configuration
B
bao liang 已提交
93 94 95 96 97
mybatis-plus.configuration.map-underscore-to-camel-case=true
mybatis-plus.configuration.cache-enabled=false
mybatis-plus.configuration.call-setters-on-nulls=true
mybatis-plus.configuration.jdbc-type-for-null=null

98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
# master settings
# master execute thread num
master.exec.threads=100

# master execute task number in parallel
master.exec.task.num=20

# master heartbeat interval
master.heartbeat.interval=10

# master commit task retry times
master.task.commit.retryTimes=5

# master commit task interval
master.task.commit.interval=1000


# only less than cpu avg load, master server can work. default value : the number of cpu cores * 2
master.max.cpuload.avg=100

# only larger than reserved memory, master server can work. default value : physical memory * 1/10, unit is G.
master.reserved.memory=0.1

# worker settings
# worker execute thread num
worker.exec.threads=100

# worker heartbeat interval
worker.heartbeat.interval=10

# submit the number of tasks at a time
worker.fetch.task.num = 3

# only less than cpu avg load, worker server can work. default value : the number of cpu cores * 2
worker.max.cpuload.avg=100

# only larger than reserved memory, worker server can work. default value : physical memory * 1/6, unit is G.
worker.reserved.memory=0.1

B
bao liang 已提交
137
# data quality analysis is not currently in use. please ignore the following configuration
138
# task record
B
bao liang 已提交
139 140 141 142 143 144
task.record.flag=false
task.record.datasource.url=jdbc:mysql://192.168.xx.xx:3306/etl?characterEncoding=UTF-8
task.record.datasource.username=xx
task.record.datasource.password=xx

# Logger Config
145
#logging.level.org.apache.dolphinscheduler.dao=debug