You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by hx...@apache.org on 2021/04/17 16:07:48 UTC
[iotdb] 04/14: [IOTDB-1283] add-node.sh supports printgc (#2978)
This is an automated email from the ASF dual-hosted git repository.
hxd pushed a commit to branch testcontainer
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit fad93b9e4af2ae0223f0fff3d424226493b09075
Author: Jamber <ja...@sina.com>
AuthorDate: Tue Apr 13 09:53:31 2021 +0800
[IOTDB-1283] add-node.sh supports printgc (#2978)
Co-authored-by: haiyi.zb <ha...@alibaba-inc.com>
---
cluster/src/assembly/resources/sbin/add-node.sh | 25 ++++++++++++++++++++++---
1 file changed, 22 insertions(+), 3 deletions(-)
diff --git a/cluster/src/assembly/resources/sbin/add-node.sh b/cluster/src/assembly/resources/sbin/add-node.sh
index 807175b..4304135 100755
--- a/cluster/src/assembly/resources/sbin/add-node.sh
+++ b/cluster/src/assembly/resources/sbin/add-node.sh
@@ -27,15 +27,34 @@ if [ -z "${IOTDB_HOME}" ]; then
export IOTDB_HOME="`dirname "$0"`/.."
fi
-IOTDB_CONF=${IOTDB_HOME}/conf
-# IOTDB_LOGS=${IOTDB_HOME}/logs
+enable_printgc=false
+if [ "$#" -ge "1" -a "$1" == "printgc" ]; then
+ enable_printgc=true;
+ shift
+fi
+
+IOTDB_CONF=$1
+if [ -z "${IOTDB_CONF}" ]; then
+ export IOTDB_CONF=${IOTDB_HOME}/conf
+fi
if [ -f "$IOTDB_CONF/iotdb-env.sh" ]; then
- . "$IOTDB_CONF/iotdb-env.sh"
+ if [ $enable_printgc == "true" ]; then
+ . "$IOTDB_CONF/iotdb-env.sh" "printgc"
+ else
+ . "$IOTDB_CONF/iotdb-env.sh"
+ fi
+elif [ -f "${IOTDB_HOME}/conf/iotdb-env.sh" ]; then
+ if [ $enable_printgc == "true" ]; then
+ . "${IOTDB_HOME}/conf/iotdb-env.sh" "printgc"
+ else
+ . "${IOTDB_HOME}/conf/iotdb-env.sh"
+ fi
else
echo "can't find $IOTDB_CONF/iotdb-env.sh"
fi
+
if [ -n "$JAVA_HOME" ]; then
for java in "$JAVA_HOME"/bin/amd64/java "$JAVA_HOME"/bin/java; do
if [ -x "$java" ]; then