This is an automated email from the ASF dual-hosted git repository.
tyrantlucifer pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-seatunnel.git
The following commit(s) were added to refs/heads/dev by this push:
new 4fcb3caf0 [Improve][Engine] SeaTunnel Engine support user-defined jvm
parameters (#3307)
4fcb3caf0 is described below
commit 4fcb3caf0f984bc6745d0d1752b293ab0de421f4
Author: TaoZex <[email protected]>
AuthorDate: Tue Nov 8 15:33:41 2022 +0800
[Improve][Engine] SeaTunnel Engine support user-defined jvm parameters
(#3307)
* [Improve] [Engine] Enables engine to configure GC parameters Xms and Xmx
* [Improve] [Engine] Enables engine to configure all GC parameters by
JvmOption
* [Improve] [Engine] Enables engine to configure GC parameters by
seatunnel-env.sh
---
.../seatunnel-starter/src/main/bin/seatunnel-cluster.sh | 13 +++++++++++++
seatunnel-core/seatunnel-starter/src/main/bin/seatunnel.sh | 13 +++++++++++++
2 files changed, 26 insertions(+)
diff --git a/seatunnel-core/seatunnel-starter/src/main/bin/seatunnel-cluster.sh
b/seatunnel-core/seatunnel-starter/src/main/bin/seatunnel-cluster.sh
index 97b2a8f81..74e946009 100755
--- a/seatunnel-core/seatunnel-starter/src/main/bin/seatunnel-cluster.sh
+++ b/seatunnel-core/seatunnel-starter/src/main/bin/seatunnel-cluster.sh
@@ -60,6 +60,19 @@ if [ -z $SEATUNNEL_CONFIG ]; then
SEATUNNEL_CONFIG=${CONF_DIR}/seatunnel.yaml
fi
+if test ${JvmOption} ;then
+ JAVA_OPTS="${JAVA_OPTS} ${JvmOption}"
+fi
+
+for i in "$@"
+do
+ if [[ "${i}" == *"JvmOption"* ]]; then
+ JVM_OPTION="${i}"
+ JAVA_OPTS="${JAVA_OPTS} ${JVM_OPTION#*=}"
+ break
+ fi
+done
+
JAVA_OPTS="${JAVA_OPTS} -Dseatunnel.config=${SEATUNNEL_CONFIG}"
JAVA_OPTS="${JAVA_OPTS} -Dhazelcast.config=${HAZELCAST_CONFIG}"
diff --git a/seatunnel-core/seatunnel-starter/src/main/bin/seatunnel.sh
b/seatunnel-core/seatunnel-starter/src/main/bin/seatunnel.sh
index 7bf8fa0a8..05f2b7241 100755
--- a/seatunnel-core/seatunnel-starter/src/main/bin/seatunnel.sh
+++ b/seatunnel-core/seatunnel-starter/src/main/bin/seatunnel.sh
@@ -64,6 +64,19 @@ if [ -z $SEATUNNEL_CONFIG ]; then
SEATUNNEL_CONFIG=${CONF_DIR}/seatunnel.yaml
fi
+if test ${JvmOption} ;then
+ JAVA_OPTS="${JAVA_OPTS} ${JvmOption}"
+fi
+
+for i in "$@"
+do
+ if [[ "${i}" == *"JvmOption"* ]]; then
+ JVM_OPTION="${i}"
+ JAVA_OPTS="${JAVA_OPTS} ${JVM_OPTION#*=}"
+ break
+ fi
+done
+
JAVA_OPTS="${JAVA_OPTS} -Dhazelcast.client.config=${HAZELCAST_CLIENT_CONFIG}"
JAVA_OPTS="${JAVA_OPTS} -Dseatunnel.config=${SEATUNNEL_CONFIG}"
JAVA_OPTS="${JAVA_OPTS} -Dhazelcast.config=${HAZELCAST_CONFIG}"