Browse Source
Currently the size of our distribute package is up to 800MB, this patch is migrate python gateway server into api server The distribute package size before and after this patch is: ```sh # before 796M apache-dolphinscheduler-2.0.4-SNAPSHOT-bin.tar.gz # after 647M apache-dolphinscheduler-2.0.4-SNAPSHOT-bin.tar.gz ```3.0.0/version-upgrade
Jiajie Zhong
3 years ago
committed by
GitHub
33 changed files with 108 additions and 483 deletions
@ -1,64 +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. |
||||
--> |
||||
|
||||
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.1.0" |
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
||||
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd"> |
||||
<id>dolphinscheduler-python-gateway-server</id> |
||||
<formats> |
||||
<format>dir</format> |
||||
</formats> |
||||
<includeBaseDirectory>false</includeBaseDirectory> |
||||
<baseDirectory>python-gateway-server</baseDirectory> |
||||
<fileSets> |
||||
<fileSet> |
||||
<directory>${basedir}/src/main/resources</directory> |
||||
<includes> |
||||
<include>*.yaml</include> |
||||
<include>*.xml</include> |
||||
</includes> |
||||
<outputDirectory>conf</outputDirectory> |
||||
</fileSet> |
||||
<fileSet> |
||||
<directory>${basedir}/src/main/bin</directory> |
||||
<outputDirectory>bin</outputDirectory> |
||||
<fileMode>0755</fileMode> |
||||
<directoryMode>0755</directoryMode> |
||||
</fileSet> |
||||
<fileSet> |
||||
<directory>${basedir}/../script/env</directory> |
||||
<outputDirectory>bin</outputDirectory> |
||||
<includes> |
||||
<include>dolphinscheduler_env.sh</include> |
||||
</includes> |
||||
<fileMode>0755</fileMode> |
||||
<directoryMode>0755</directoryMode> |
||||
</fileSet> |
||||
<fileSet> |
||||
<directory>${basedir}/../dolphinscheduler-common/src/main/resources</directory> |
||||
<includes> |
||||
<include>**/*.properties</include> |
||||
</includes> |
||||
<outputDirectory>conf</outputDirectory> |
||||
</fileSet> |
||||
</fileSets> |
||||
<dependencySets> |
||||
<dependencySet> |
||||
<outputDirectory>libs</outputDirectory> |
||||
</dependencySet> |
||||
</dependencySets> |
||||
</assembly> |
@ -1,32 +0,0 @@
|
||||
#!/bin/bash |
||||
# |
||||
# 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. |
||||
# |
||||
|
||||
BIN_DIR=$(dirname $0) |
||||
DOLPHINSCHEDULER_HOME=${DOLPHINSCHEDULER_HOME:-$(cd $BIN_DIR/..; pwd)} |
||||
|
||||
source "$BIN_DIR/dolphinscheduler_env.sh" |
||||
|
||||
JAVA_OPTS=${JAVA_OPTS:-"-server -Duser.timezone=${SPRING_JACKSON_TIME_ZONE} -Xms1g -Xmx1g -Xmn512m -XX:+PrintGCDetails -Xloggc:gc.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=dump.hprof"} |
||||
|
||||
if [[ "$DOCKER" == "true" ]]; then |
||||
JAVA_OPTS="${JAVA_OPTS} -XX:-UseContainerSupport" |
||||
fi |
||||
|
||||
java $JAVA_OPTS \ |
||||
-cp "$DOLPHINSCHEDULER_HOME/conf":"$DOLPHINSCHEDULER_HOME/libs/*" \ |
||||
org.apache.dolphinscheduler.server.PythonGatewayServer |
@ -1,34 +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. |
||||
# |
||||
|
||||
FROM openjdk:8-jre-slim-buster |
||||
|
||||
ENV DOCKER true |
||||
ENV TZ Asia/Shanghai |
||||
ENV DOLPHINSCHEDULER_HOME /opt/dolphinscheduler |
||||
|
||||
RUN apt update ; \ |
||||
apt install -y curl sudo ; \ |
||||
rm -rf /var/lib/apt/lists/* |
||||
|
||||
WORKDIR $DOLPHINSCHEDULER_HOME |
||||
|
||||
ADD ./target/python-gateway-server $DOLPHINSCHEDULER_HOME |
||||
|
||||
EXPOSE 25333 54321 |
||||
|
||||
CMD [ "/bin/bash", "./bin/start.sh" ] |
@ -1,83 +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. |
||||
# |
||||
|
||||
spring: |
||||
application: |
||||
name: python-gateway-server |
||||
main: |
||||
banner-mode: off |
||||
datasource: |
||||
driver-class-name: org.h2.Driver |
||||
url: jdbc:h2:mem:dolphinscheduler;MODE=MySQL;DB_CLOSE_DELAY=-1;DATABASE_TO_LOWER=true |
||||
username: sa |
||||
password: "" |
||||
jackson: |
||||
time-zone: UTC |
||||
date-format: "yyyy-MM-dd HH:mm:ss" |
||||
servlet: |
||||
multipart: |
||||
max-file-size: 1024MB |
||||
max-request-size: 1024MB |
||||
messages: |
||||
basename: i18n/messages |
||||
jpa: |
||||
hibernate: |
||||
ddl-auto: none |
||||
|
||||
python-gateway: |
||||
# The address of Python gateway server start. Set its value to `0.0.0.0` if your Python API run in different |
||||
# between Python gateway server. It could be be specific to other address like `127.0.0.1` or `localhost` |
||||
gateway-server-address: 0.0.0.0 |
||||
# The port of Python gateway server start. Define which port you could connect to Python gateway server from |
||||
# Python API side. |
||||
gateway-server-port: 25333 |
||||
# The address of Python callback client. |
||||
python-address: 127.0.0.1 |
||||
# The port of Python callback client. |
||||
python-port: 25334 |
||||
# Close connection of socket server if no other request accept after x milliseconds. Define value is (0 = infinite), |
||||
# and socket server would never close even though no requests accept |
||||
connect-timeout: 0 |
||||
# Close each active connection of socket server if python program not active after x milliseconds. Define value is |
||||
# (0 = infinite), and socket server would never close even though no requests accept |
||||
read-timeout: 0 |
||||
|
||||
server: |
||||
port: 54321 |
||||
|
||||
management: |
||||
endpoints: |
||||
web: |
||||
exposure: |
||||
include: '*' |
||||
metrics: |
||||
tags: |
||||
application: ${spring.application.name} |
||||
|
||||
metrics: |
||||
enabled: true |
||||
|
||||
# Override by profile |
||||
--- |
||||
spring: |
||||
config: |
||||
activate: |
||||
on-profile: postgresql |
||||
quartz: |
||||
properties: |
||||
org.quartz.jobStore.driverDelegateClass: org.quartz.impl.jdbcjobstore.PostgreSQLDelegate |
||||
|
@ -1,57 +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. |
||||
--> |
||||
|
||||
<configuration scan="true" scanPeriod="120 seconds"> |
||||
<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="PYTHONGATEWAYLOGFILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
||||
<file>${log.base}/dolphinscheduler-python-gateway.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-python-gateway.%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> |
||||
|
||||
<root level="INFO"> |
||||
<if condition="${DOCKER:-false}"> |
||||
<then> |
||||
<appender-ref ref="STDOUT"/> |
||||
</then> |
||||
</if> |
||||
<appender-ref ref="PYTHONGATEWAYLOGFILE"/> |
||||
</root> |
||||
</configuration> |
Loading…
Reference in new issue