This is an automated email from the ASF dual-hosted git repository.
chaow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new f5c3c1d [IOTDB-1283] add-node.sh supports printgc (#2978)
f5c3c1d is described below
commit f5c3c1d232ad801dcb0be8d17a36591ecea2ea8c
Author: Jamber <[email protected]>
AuthorDate: Tue Apr 13 09:53:31 2021 +0800
[IOTDB-1283] add-node.sh supports printgc (#2978)
Co-authored-by: haiyi.zb <[email protected]>
---
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