BoYiZhang
5 years ago
committed by
GitHub
332 changed files with 13285 additions and 5993 deletions
@ -0,0 +1,117 @@
|
||||
/* |
||||
* Copyright 2007-present the original author or authors. |
||||
* |
||||
* Licensed 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. |
||||
*/ |
||||
import java.net.*; |
||||
import java.io.*; |
||||
import java.nio.channels.*; |
||||
import java.util.Properties; |
||||
|
||||
public class MavenWrapperDownloader { |
||||
|
||||
private static final String WRAPPER_VERSION = "0.5.6"; |
||||
/** |
||||
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. |
||||
*/ |
||||
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/" |
||||
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar"; |
||||
|
||||
/** |
||||
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to |
||||
* use instead of the default one. |
||||
*/ |
||||
private static final String MAVEN_WRAPPER_PROPERTIES_PATH = |
||||
".mvn/wrapper/maven-wrapper.properties"; |
||||
|
||||
/** |
||||
* Path where the maven-wrapper.jar will be saved to. |
||||
*/ |
||||
private static final String MAVEN_WRAPPER_JAR_PATH = |
||||
".mvn/wrapper/maven-wrapper.jar"; |
||||
|
||||
/** |
||||
* Name of the property which should be used to override the default download url for the wrapper. |
||||
*/ |
||||
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; |
||||
|
||||
public static void main(String args[]) { |
||||
System.out.println("- Downloader started"); |
||||
File baseDirectory = new File(args[0]); |
||||
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); |
||||
|
||||
// If the maven-wrapper.properties exists, read it and check if it contains a custom
|
||||
// wrapperUrl parameter.
|
||||
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); |
||||
String url = DEFAULT_DOWNLOAD_URL; |
||||
if(mavenWrapperPropertyFile.exists()) { |
||||
FileInputStream mavenWrapperPropertyFileInputStream = null; |
||||
try { |
||||
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); |
||||
Properties mavenWrapperProperties = new Properties(); |
||||
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); |
||||
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); |
||||
} catch (IOException e) { |
||||
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); |
||||
} finally { |
||||
try { |
||||
if(mavenWrapperPropertyFileInputStream != null) { |
||||
mavenWrapperPropertyFileInputStream.close(); |
||||
} |
||||
} catch (IOException e) { |
||||
// Ignore ...
|
||||
} |
||||
} |
||||
} |
||||
System.out.println("- Downloading from: " + url); |
||||
|
||||
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); |
||||
if(!outputFile.getParentFile().exists()) { |
||||
if(!outputFile.getParentFile().mkdirs()) { |
||||
System.out.println( |
||||
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'"); |
||||
} |
||||
} |
||||
System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); |
||||
try { |
||||
downloadFileFromURL(url, outputFile); |
||||
System.out.println("Done"); |
||||
System.exit(0); |
||||
} catch (Throwable e) { |
||||
System.out.println("- Error downloading"); |
||||
e.printStackTrace(); |
||||
System.exit(1); |
||||
} |
||||
} |
||||
|
||||
private static void downloadFileFromURL(String urlString, File destination) throws Exception { |
||||
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) { |
||||
String username = System.getenv("MVNW_USERNAME"); |
||||
char[] password = System.getenv("MVNW_PASSWORD").toCharArray(); |
||||
Authenticator.setDefault(new Authenticator() { |
||||
@Override |
||||
protected PasswordAuthentication getPasswordAuthentication() { |
||||
return new PasswordAuthentication(username, password); |
||||
} |
||||
}); |
||||
} |
||||
URL website = new URL(urlString); |
||||
ReadableByteChannel rbc; |
||||
rbc = Channels.newChannel(website.openStream()); |
||||
FileOutputStream fos = new FileOutputStream(destination); |
||||
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); |
||||
fos.close(); |
||||
rbc.close(); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,2 @@
|
||||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip |
||||
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar |
@ -1,115 +0,0 @@
|
||||
# |
||||
# 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. |
||||
# |
||||
|
||||
# base spring data source configuration |
||||
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource |
||||
# postgre |
||||
spring.datasource.driver-class-name=org.postgresql.Driver |
||||
spring.datasource.url=jdbc:postgresql://${POSTGRESQL_HOST}:${POSTGRESQL_PORT}/${POSTGRESQL_DATABASE}?characterEncoding=utf8 |
||||
# mysql |
||||
#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 |
||||
spring.datasource.username=${POSTGRESQL_USERNAME} |
||||
spring.datasource.password=${POSTGRESQL_PASSWORD} |
||||
# connection configuration |
||||
spring.datasource.initialSize=5 |
||||
# min connection number |
||||
spring.datasource.minIdle=5 |
||||
# 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. |
||||
spring.datasource.maxWait=60000 |
||||
# milliseconds for check to close free connections |
||||
spring.datasource.timeBetweenEvictionRunsMillis=60000 |
||||
# 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 |
||||
spring.datasource.minEvictableIdleTimeMillis=300000 |
||||
#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. |
||||
spring.datasource.validationQuery=SELECT 1 |
||||
#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 |
||||
spring.datasource.testWhileIdle=true |
||||
#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 |
||||
spring.datasource.testOnReturn=false |
||||
spring.datasource.defaultAutoCommit=true |
||||
spring.datasource.keepAlive=true |
||||
# open PSCache, specify count PSCache for every connection |
||||
spring.datasource.poolPreparedStatements=true |
||||
spring.datasource.maxPoolPreparedStatementPerConnectionSize=20 |
||||
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 |
||||
#Entity scan, where multiple packages are separated by a comma or semicolon |
||||
mybatis-plus.typeAliasesPackage=org.apache.dolphinscheduler.dao.entity |
||||
#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"; |
||||
mybatis-plus.global-config.db-config.id-type=AUTO |
||||
#Field policy IGNORED:" ignore judgment ",NOT_NULL:" not NULL judgment "),NOT_EMPTY:" not NULL judgment" |
||||
mybatis-plus.global-config.db-config.field-strategy=NOT_NULL |
||||
#The hump underline is converted |
||||
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 |
||||
#The original configuration |
||||
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 |
||||
|
||||
# master settings |
||||
# master execute thread num |
||||
master.exec.threads=${MASTER_EXEC_THREADS} |
||||
# master execute task number in parallel |
||||
master.exec.task.num=${MASTER_EXEC_TASK_NUM} |
||||
# master heartbeat interval |
||||
master.heartbeat.interval=${MASTER_HEARTBEAT_INTERVAL} |
||||
# master commit task retry times |
||||
master.task.commit.retryTimes=${MASTER_TASK_COMMIT_RETRYTIMES} |
||||
# master commit task interval |
||||
master.task.commit.interval=${MASTER_TASK_COMMIT_INTERVAL} |
||||
# only less than cpu avg load, master server can work. default value : the number of cpu cores * 2 |
||||
master.max.cpuload.avg=${MASTER_MAX_CPULOAD_AVG} |
||||
# only larger than reserved memory, master server can work. default value : physical memory * 1/10, unit is G. |
||||
master.reserved.memory=${MASTER_RESERVED_MEMORY} |
||||
|
||||
# worker settings |
||||
# worker execute thread num |
||||
worker.exec.threads=${WORKER_EXEC_THREADS} |
||||
# worker heartbeat interval |
||||
worker.heartbeat.interval=${WORKER_HEARTBEAT_INTERVAL} |
||||
# submit the number of tasks at a time |
||||
worker.fetch.task.num=${WORKER_FETCH_TASK_NUM} |
||||
# only less than cpu avg load, worker server can work. default value : the number of cpu cores * 2 |
||||
worker.max.cpuload.avg=${WORKER_MAX_CPULOAD_AVG} |
||||
# only larger than reserved memory, worker server can work. default value : physical memory * 1/6, unit is G. |
||||
worker.reserved.memory=${WORKER_RESERVED_MEMORY} |
||||
|
||||
# data quality analysis is not currently in use. please ignore the following configuration |
||||
# task record |
||||
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 |
@ -0,0 +1,71 @@
|
||||
# |
||||
# 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. |
||||
# |
||||
|
||||
|
||||
# mysql |
||||
#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 |
||||
|
||||
# postgre |
||||
spring.datasource.driver-class-name=org.postgresql.Driver |
||||
spring.datasource.url=jdbc:postgresql://${POSTGRESQL_HOST}:${POSTGRESQL_PORT}/${POSTGRESQL_DATABASE}?characterEncoding=utf8 |
||||
spring.datasource.username=${POSTGRESQL_USERNAME} |
||||
spring.datasource.password=${POSTGRESQL_PASSWORD} |
||||
|
||||
## base spring data source configuration todo need to remove |
||||
#spring.datasource.type=com.alibaba.druid.pool.DruidDataSource |
||||
|
||||
# connection configuration |
||||
#spring.datasource.initialSize=5 |
||||
# min connection number |
||||
#spring.datasource.minIdle=5 |
||||
# 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. |
||||
#spring.datasource.maxWait=60000 |
||||
|
||||
# milliseconds for check to close free connections |
||||
#spring.datasource.timeBetweenEvictionRunsMillis=60000 |
||||
|
||||
# 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 |
||||
#spring.datasource.minEvictableIdleTimeMillis=300000 |
||||
|
||||
#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. |
||||
#spring.datasource.validationQuery=SELECT 1 |
||||
|
||||
#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 |
||||
#spring.datasource.testWhileIdle=true |
||||
|
||||
#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 |
||||
#spring.datasource.testOnReturn=false |
||||
#spring.datasource.defaultAutoCommit=true |
||||
#spring.datasource.keepAlive=true |
||||
|
||||
# open PSCache, specify count PSCache for every connection |
||||
#spring.datasource.poolPreparedStatements=true |
||||
#spring.datasource.maxPoolPreparedStatementPerConnectionSize=20 |
@ -0,0 +1,40 @@
|
||||
# |
||||
# 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. |
||||
# |
||||
|
||||
# master execute thread num |
||||
master.exec.threads=${MASTER_EXEC_THREADS} |
||||
|
||||
# master execute task number in parallel |
||||
master.exec.task.num=${MASTER_EXEC_TASK_NUM} |
||||
|
||||
# master heartbeat interval |
||||
master.heartbeat.interval=${MASTER_HEARTBEAT_INTERVAL} |
||||
|
||||
# master commit task retry times |
||||
master.task.commit.retryTimes=${MASTER_TASK_COMMIT_RETRYTIMES} |
||||
|
||||
# master commit task interval |
||||
master.task.commit.interval=${MASTER_TASK_COMMIT_INTERVAL} |
||||
|
||||
# only less than cpu avg load, master server can work. default value : the number of cpu cores * 2 |
||||
master.max.cpuload.avg=${MASTER_MAX_CPULOAD_AVG} |
||||
|
||||
# only larger than reserved memory, master server can work. default value : physical memory * 1/10, unit is G. |
||||
master.reserved.memory=${MASTER_RESERVED_MEMORY} |
||||
|
||||
# master listen port |
||||
#master.listen.port=${MASTER_LISTEN_PORT} |
@ -0,0 +1,37 @@
|
||||
# |
||||
# 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. |
||||
# |
||||
|
||||
# worker execute thread num |
||||
worker.exec.threads=${WORKER_EXEC_THREADS} |
||||
|
||||
# worker heartbeat interval |
||||
worker.heartbeat.interval=${WORKER_HEARTBEAT_INTERVAL} |
||||
|
||||
# submit the number of tasks at a time |
||||
worker.fetch.task.num=${WORKER_FETCH_TASK_NUM} |
||||
|
||||
# only less than cpu avg load, worker server can work. default value : the number of cpu cores * 2 |
||||
worker.max.cpuload.avg=${WORKER_MAX_CPULOAD_AVG} |
||||
|
||||
# only larger than reserved memory, worker server can work. default value : physical memory * 1/6, unit is G. |
||||
worker.reserved.memory=${WORKER_RESERVED_MEMORY} |
||||
|
||||
# worker listener port |
||||
#worker.listen.port=${WORKER_LISTEN_PORT} |
||||
|
||||
# default worker group |
||||
#worker.group=${WORKER_GROUP} |
@ -0,0 +1,29 @@
|
||||
# |
||||
# 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. |
||||
# |
||||
|
||||
# zookeeper cluster. multiple are separated by commas. eg. 192.168.xx.xx:2181,192.168.xx.xx:2181,192.168.xx.xx:2181 |
||||
zookeeper.quorum=${ZOOKEEPER_QUORUM} |
||||
|
||||
# dolphinscheduler root directory |
||||
#zookeeper.dolphinscheduler.root=/dolphinscheduler |
||||
|
||||
# dolphinscheduler failover directory |
||||
#zookeeper.session.timeout=300 |
||||
#zookeeper.connection.timeout=300 |
||||
#zookeeper.retry.base.sleep=100 |
||||
#zookeeper.retry.max.sleep=30000 |
||||
#zookeeper.retry.maxtime=5 |
@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!-- |
||||
~ 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. |
||||
--> |
||||
|
||||
<!-- Logback configuration. See http://logback.qos.ch/manual/index.html --> |
||||
<configuration scan="true" scanPeriod="120 seconds"> <!--debug="true" --> |
||||
|
||||
<property name="log.base" value="logs"/> |
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> |
||||
<encoder> |
||||
<pattern> |
||||
[%level] %date{yyyy-MM-dd HH:mm:ss.SSS} %logger{96}:[%line] - %msg%n |
||||
</pattern> |
||||
<charset>UTF-8</charset> |
||||
</encoder> |
||||
</appender> |
||||
|
||||
<appender name="ALERTLOGFILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
||||
<file>${log.base}/dolphinscheduler-alert.log</file> |
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> |
||||
<fileNamePattern>${log.base}/dolphinscheduler-alert.%d{yyyy-MM-dd_HH}.%i.log</fileNamePattern> |
||||
<maxHistory>20</maxHistory> |
||||
<maxFileSize>64MB</maxFileSize> |
||||
</rollingPolicy> |
||||
<encoder> |
||||
<pattern> |
||||
[%level] %date{yyyy-MM-dd HH:mm:ss.SSS} %logger{96}:[%line] - %msg%n |
||||
</pattern> |
||||
<charset>UTF-8</charset> |
||||
</encoder> |
||||
</appender> |
||||
|
||||
<root level="INFO"> |
||||
<appender-ref ref="STDOUT"/> |
||||
<appender-ref ref="APILOGFILE"/> |
||||
</root> |
||||
|
||||
</configuration> |
@ -0,0 +1,62 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!-- |
||||
~ 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. |
||||
--> |
||||
|
||||
<!-- Logback configuration. See http://logback.qos.ch/manual/index.html --> |
||||
<configuration scan="true" scanPeriod="120 seconds"> <!--debug="true" --> |
||||
|
||||
<property name="log.base" value="logs"/> |
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> |
||||
<encoder> |
||||
<pattern> |
||||
[%level] %date{yyyy-MM-dd HH:mm:ss.SSS} %logger{96}:[%line] - %msg%n |
||||
</pattern> |
||||
<charset>UTF-8</charset> |
||||
</encoder> |
||||
</appender> |
||||
|
||||
<!-- api server logback config start --> |
||||
<appender name="APILOGFILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
||||
<file>${log.base}/dolphinscheduler-api-server.log</file> |
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter"> |
||||
<level>INFO</level> |
||||
</filter> |
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> |
||||
<fileNamePattern>${log.base}/dolphinscheduler-api-server.%d{yyyy-MM-dd_HH}.%i.log</fileNamePattern> |
||||
<maxHistory>168</maxHistory> |
||||
<maxFileSize>64MB</maxFileSize> |
||||
</rollingPolicy> |
||||
<encoder> |
||||
<pattern> |
||||
[%level] %date{yyyy-MM-dd HH:mm:ss.SSS} %logger{96}:[%line] - %msg%n |
||||
</pattern> |
||||
<charset>UTF-8</charset> |
||||
</encoder> |
||||
</appender> |
||||
<!-- api server logback config end --> |
||||
|
||||
<logger name="org.apache.zookeeper" level="WARN"/> |
||||
<logger name="org.apache.hbase" level="WARN"/> |
||||
<logger name="org.apache.hadoop" level="WARN"/> |
||||
|
||||
|
||||
<root level="INFO"> |
||||
<appender-ref ref="STDOUT"/> |
||||
<appender-ref ref="APILOGFILE"/> |
||||
</root> |
||||
|
||||
</configuration> |
File diff suppressed because one or more lines are too long
@ -1,169 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!-- |
||||
~ 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. |
||||
--> |
||||
|
||||
<!-- Logback configuration. See http://logback.qos.ch/manual/index.html --> |
||||
<configuration scan="true" scanPeriod="120 seconds"> <!--debug="true" --> |
||||
|
||||
<property name="log.base" value="logs"/> |
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> |
||||
<encoder> |
||||
<pattern> |
||||
[%level] %date{yyyy-MM-dd HH:mm:ss.SSS} %logger{96}:[%line] - %msg%n |
||||
</pattern> |
||||
<charset>UTF-8</charset> |
||||
</encoder> |
||||
</appender> |
||||
|
||||
|
||||
<!-- master server logback config start --> |
||||
<appender name="MASTERLOGFILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
||||
<file>${log.base}/dolphinscheduler-master.log</file> |
||||
<!--<filter class="org.apache.dolphinscheduler.common.log.MasterLogFilter"> |
||||
<level>INFO</level> |
||||
</filter>--> |
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> |
||||
<fileNamePattern>${log.base}/dolphinscheduler-master.%d{yyyy-MM-dd_HH}.%i.log</fileNamePattern> |
||||
<maxHistory>168</maxHistory> |
||||
<maxFileSize>200MB</maxFileSize> |
||||
</rollingPolicy> |
||||
<encoder> |
||||
<pattern> |
||||
[%level] %date{yyyy-MM-dd HH:mm:ss.SSS} %logger{96}:[%line] - %msg%n |
||||
</pattern> |
||||
<charset>UTF-8</charset> |
||||
</encoder> |
||||
</appender> |
||||
<!-- master server logback config end --> |
||||
|
||||
|
||||
<!-- worker server logback config start --> |
||||
<conversionRule conversionWord="messsage" |
||||
converterClass="org.apache.dolphinscheduler.common.log.SensitiveDataConverter"/> |
||||
<appender name="TASKLOGFILE" class="ch.qos.logback.classic.sift.SiftingAppender"> |
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter"> |
||||
<level>INFO</level> |
||||
</filter> |
||||
<filter class="org.apache.dolphinscheduler.common.log.TaskLogFilter"/> |
||||
<Discriminator class="org.apache.dolphinscheduler.common.log.TaskLogDiscriminator"> |
||||
<key>taskAppId</key> |
||||
<logBase>${log.base}</logBase> |
||||
</Discriminator> |
||||
<sift> |
||||
<appender name="FILE-${taskAppId}" class="ch.qos.logback.core.FileAppender"> |
||||
<file>${log.base}/${taskAppId}.log</file> |
||||
<encoder> |
||||
<pattern> |
||||
[%level] %date{yyyy-MM-dd HH:mm:ss.SSS} %logger{96}:[%line] - %messsage%n |
||||
</pattern> |
||||
<charset>UTF-8</charset> |
||||
</encoder> |
||||
<append>true</append> |
||||
</appender> |
||||
</sift> |
||||
</appender> |
||||
<appender name="WORKERLOGFILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
||||
<file>${log.base}/dolphinscheduler-worker.log</file> |
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter"> |
||||
<level>INFO</level> |
||||
</filter> |
||||
<filter class="org.apache.dolphinscheduler.common.log.WorkerLogFilter"/> |
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> |
||||
<fileNamePattern>${log.base}/dolphinscheduler-worker.%d{yyyy-MM-dd_HH}.%i.log</fileNamePattern> |
||||
<maxHistory>168</maxHistory> |
||||
<maxFileSize>200MB</maxFileSize> |
||||
</rollingPolicy> |
||||
<encoder> |
||||
<pattern> |
||||
[%level] %date{yyyy-MM-dd HH:mm:ss.SSS} %logger{96}:[%line] - %messsage%n |
||||
</pattern> |
||||
<charset>UTF-8</charset> |
||||
</encoder> |
||||
</appender> |
||||
<!-- worker server logback config end --> |
||||
|
||||
|
||||
<!-- alert server logback config start --> |
||||
<appender name="ALERTLOGFILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
||||
<file>${log.base}/dolphinscheduler-alert.log</file> |
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> |
||||
<fileNamePattern>${log.base}/dolphinscheduler-alert.%d{yyyy-MM-dd_HH}.%i.log</fileNamePattern> |
||||
<maxHistory>20</maxHistory> |
||||
<maxFileSize>64MB</maxFileSize> |
||||
</rollingPolicy> |
||||
<encoder> |
||||
<pattern> |
||||
[%level] %date{yyyy-MM-dd HH:mm:ss.SSS} %logger{96}:[%line] - %msg%n |
||||
</pattern> |
||||
<charset>UTF-8</charset> |
||||
</encoder> |
||||
</appender> |
||||
<!-- alert server logback config end --> |
||||
|
||||
|
||||
<!-- api server logback config start --> |
||||
<appender name="APILOGFILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
||||
<file>${log.base}/dolphinscheduler-api-server.log</file> |
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter"> |
||||
<level>INFO</level> |
||||
</filter> |
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> |
||||
<fileNamePattern>${log.base}/dolphinscheduler-api-server.%d{yyyy-MM-dd_HH}.%i.log</fileNamePattern> |
||||
<maxHistory>168</maxHistory> |
||||
<maxFileSize>64MB</maxFileSize> |
||||
</rollingPolicy> |
||||
<encoder> |
||||
<pattern> |
||||
[%level] %date{yyyy-MM-dd HH:mm:ss.SSS} %logger{96}:[%line] - %msg%n |
||||
</pattern> |
||||
<charset>UTF-8</charset> |
||||
</encoder> |
||||
</appender> |
||||
<!-- api server logback config end --> |
||||
|
||||
<logger name="org.apache.zookeeper" level="WARN"/> |
||||
<logger name="org.apache.hbase" level="WARN"/> |
||||
<logger name="org.apache.hadoop" level="WARN"/> |
||||
|
||||
|
||||
<root level="INFO"> |
||||
<appender-ref ref="STDOUT"/> |
||||
|
||||
<if condition='p("server").contains("master-server")'> |
||||
<then> |
||||
<appender-ref ref="MASTERLOGFILE"/> |
||||
</then> |
||||
</if> |
||||
<if condition='p("server").contains("worker-server")'> |
||||
<then> |
||||
<appender-ref ref="TASKLOGFILE"/> |
||||
<appender-ref ref="WORKERLOGFILE"/> |
||||
</then> |
||||
</if> |
||||
<if condition='p("server").contains("alert-server")'> |
||||
<then> |
||||
<appender-ref ref="ALERTLOGFILE"/> |
||||
</then> |
||||
</if> |
||||
<if condition='p("server").contains("api-server")'> |
||||
<then> |
||||
<appender-ref ref="APILOGFILE"/> |
||||
</then> |
||||
</if> |
||||
</root> |
||||
|
||||
</configuration> |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue