From f5f4a6b01b0739db7511815c885eb13374251319 Mon Sep 17 00:00:00 2001 From: ligang Date: Thu, 25 Apr 2019 19:04:09 +0800 Subject: [PATCH] update upgrade and create script --- script/create_escheduler.sh | 23 +++++++++++++++++++---- script/upgrade_escheduler.sh | 23 +++++++++++++++++++---- 2 files changed, 38 insertions(+), 8 deletions(-) diff --git a/script/create_escheduler.sh b/script/create_escheduler.sh index dea3b07858..c88da7bb6d 100644 --- a/script/create_escheduler.sh +++ b/script/create_escheduler.sh @@ -1,6 +1,21 @@ #!/bin/bash -workDir=`dirname $0` -workDir=`cd ${workDir};pwd` -echo "$workDir/lib" -java -Xmx1G -cp "$workDir/../lib/*" cn.escheduler.dao.upgrade.shell.CreateEscheduler +BIN_DIR=`dirname $0` +BIN_DIR=`cd "$BIN_DIR"; pwd` +ESCHEDULER_HOME=$BIN_DIR/.. + +export JAVA_HOME=$JAVA_HOME + + +export ESCHEDULER_CONF_DIR=$ESCHEDULER_HOME/conf +export ESCHEDULER_LIB_JARS=$ESCHEDULER_HOME/lib/* + +export ESCHEDULER_OPTS="-server -Xmx1g -Xms1g -Xss512k -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:LargePageSizeInBytes=128m -XX:+UseFastAccessorMethods -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70" +export STOP_TIMEOUT=5 + +CLASS=cn.escheduler.dao.upgrade.shell.CreateEscheduler + +exec_command="$ESCHEDULER_OPTS -classpath $ESCHEDULER_CONF_DIR:$ESCHEDULER_LIB_JARS $CLASS" + +cd $ESCHEDULER_HOME +$JAVA_HOME/bin/java $exec_command diff --git a/script/upgrade_escheduler.sh b/script/upgrade_escheduler.sh index 343dc5f1db..6bd6439a58 100644 --- a/script/upgrade_escheduler.sh +++ b/script/upgrade_escheduler.sh @@ -1,6 +1,21 @@ #!/bin/bash -workDir=`dirname $0` -workDir=`cd ${workDir};pwd` -echo "$workDir/lib" -java -Xmx1G -cp "$workDir/../lib/*" cn.escheduler.dao.upgrade.shell.UpgradeEscheduler +BIN_DIR=`dirname $0` +BIN_DIR=`cd "$BIN_DIR"; pwd` +ESCHEDULER_HOME=$BIN_DIR/.. + +export JAVA_HOME=$JAVA_HOME + + +export ESCHEDULER_CONF_DIR=$ESCHEDULER_HOME/conf +export ESCHEDULER_LIB_JARS=$ESCHEDULER_HOME/lib/* + +export ESCHEDULER_OPTS="-server -Xmx1g -Xms1g -Xss512k -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:LargePageSizeInBytes=128m -XX:+UseFastAccessorMethods -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70" +export STOP_TIMEOUT=5 + +CLASS=cn.escheduler.dao.upgrade.shell.UpgradeEscheduler + +exec_command="$ESCHEDULER_OPTS -classpath $ESCHEDULER_CONF_DIR:$ESCHEDULER_LIB_JARS $CLASS" + +cd $ESCHEDULER_HOME +$JAVA_HOME/bin/java $exec_command