This is an automated email from the ASF dual-hosted git repository.

leonbao pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-dolphinscheduler.git


The following commit(s) were added to refs/heads/dev by this push:
     new 6d903e2  [Feature][server] add embeded zookeeper server in 
dolphinscheduler-daemon.sh (#3293)
6d903e2 is described below

commit 6d903e266ff6a5fdbbff467a72b16f3efd5a0a9d
Author: dailidong <[email protected]>
AuthorDate: Fri Jul 31 17:37:02 2020 +0800

    [Feature][server] add embeded zookeeper server in 
dolphinscheduler-daemon.sh (#3293)
    
    * update README about DolphinScheduler
    
    * Update issue templates
    
    * update
    
    * regularize api pom xml
    update rpc maven compile to 1.8
    
    * regularize api pom xml
    
    * change commons.lang3.StringUtils to common.utils.StringUtils
    
    * update pom.xml
    
    * update
    
    * correct equals method
    
    * jasper-runtime is needed when api server start
    
    * jasper-runtime jar is needed when api server start
    
    * combine logback config of master/worker/alert/api server to one 
logback.xml
    
    * remove tomcat runtime jar
    
    * add UT
    
    * add license
    
    * remove jasper-runtime jar, not need anymore
    
    * sovle jar conflict, remove servlet-api 2.5 jar
    
    * remove servlet 2.5
    
    * add embedded database h2 and update embedded zookeeper
    
    * delete logs
    
    * add license
    
    * change log level to INFO
    
    * simplify and optimize config
    
    * add development state
    
    * simplify common config
    
    * add worker group config
    
    * add worker group config
    
    * add worker group config
    
    * this command just for getting a quick experience,not recommended for 
production. this operation will start a standalone zookeeper server
    
    * Merge remote-tracking branch 'upstream/dev' into dev
    
    * add logback for zookeeper
    
    * Update logback-zookeeper.xml
    
    Co-authored-by: lidongdai <[email protected]>
    Co-authored-by: dailidong <[email protected]>
    Co-authored-by: qiaozhanwei <[email protected]>
---
 .../src/main/resources/config/install_config.conf  |  2 +-
 .../src/main/resources/logback-zookeeper.xml       | 52 ++++++++++++++++++++++
 script/dolphinscheduler-daemon.sh                  |  4 ++
 3 files changed, 57 insertions(+), 1 deletion(-)

diff --git 
a/dolphinscheduler-server/src/main/resources/config/install_config.conf 
b/dolphinscheduler-server/src/main/resources/config/install_config.conf
index d88f1cf..a20fa66 100755
--- a/dolphinscheduler-server/src/main/resources/config/install_config.conf
+++ b/dolphinscheduler-server/src/main/resources/config/install_config.conf
@@ -141,4 +141,4 @@ alertServer="ds3"
 
 # run api machine
 # note: list of machine hostnames for deploying api server
-apiServers="ds1"
+apiServers="ds1"
\ No newline at end of file
diff --git a/dolphinscheduler-service/src/main/resources/logback-zookeeper.xml 
b/dolphinscheduler-service/src/main/resources/logback-zookeeper.xml
new file mode 100644
index 0000000..34a15a7
--- /dev/null
+++ b/dolphinscheduler-service/src/main/resources/logback-zookeeper.xml
@@ -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="LOGFILE" 
class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>${log.base}/dolphinscheduler-zookeeper.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="LOGFILE"/>
+    </root>
+
+</configuration>
diff --git a/script/dolphinscheduler-daemon.sh 
b/script/dolphinscheduler-daemon.sh
index 24b86b5..8c96764 100644
--- a/script/dolphinscheduler-daemon.sh
+++ b/script/dolphinscheduler-daemon.sh
@@ -72,6 +72,10 @@ elif [ "$command" = "alert-server" ]; then
   CLASS=org.apache.dolphinscheduler.alert.AlertServer
 elif [ "$command" = "logger-server" ]; then
   CLASS=org.apache.dolphinscheduler.server.log.LoggerServer
+elif [ "$command" = "zookeeper-server" ]; then
+  #note: this command just for getting a quick experience,not recommended for 
production. this operation will start a standalone zookeeper server
+  LOG_FILE="-Dlogback.configurationFile=classpath:logback-zookeeper.xml"
+  CLASS=org.apache.dolphinscheduler.service.zk.ZKServer
 else
   echo "Error: No command named \`$command' was found."
   exit 1

Reply via email to