diff --git a/bin/start_be.sh b/bin/start_be.sh index ae4f2355b7..c412199fed 100755 --- a/bin/start_be.sh +++ b/bin/start_be.sh @@ -19,6 +19,23 @@ curdir=`dirname "$0"` curdir=`cd "$curdir"; pwd` +OPTS=$(getopt \ + -n $0 \ + -o '' \ + -l 'daemon' \ + -- "$@") + +eval set -- "$OPTS" + +RUN_DAEMON=0 +while true; do + case "$1" in + --daemon) RUN_DAEMON=1 ; shift ;; + --) shift ; break ;; + *) ehco "Internal error" ; exit 1 ;; + esac +done + export DORIS_HOME=`cd "$curdir/.."; pwd` # export env variables from be.conf @@ -72,4 +89,8 @@ else LIMIT="/bin/limit3 -c 0 -n 65536" fi -nohup $LIMIT ${DORIS_HOME}/lib/palo_be "$@" >> $LOG_DIR/be.out 2>&1 > $LOG_DIR/be.out 2>&1 > $LOG_DIR/be.out 2>&1 > $LOG_DIR/fe.out -nohup $LIMIT $JAVA $JAVA_OPTS org.apache.doris.PaloFe "$@" >> $LOG_DIR/fe.out 2>&1 > $LOG_DIR/fe.out 2>&1 > $LOG_DIR/fe.out 2>&1 $pidfile diff --git a/fs_brokers/apache_hdfs_broker/bin/start_broker.sh b/fs_brokers/apache_hdfs_broker/bin/start_broker.sh index 01904bb55c..a08140db0a 100755 --- a/fs_brokers/apache_hdfs_broker/bin/start_broker.sh +++ b/fs_brokers/apache_hdfs_broker/bin/start_broker.sh @@ -19,6 +19,23 @@ curdir=`dirname "$0"` curdir=`cd "$curdir"; pwd` +OPTS=$(getopt \ + -n $0 \ + -o '' \ + -l 'daemon' \ + -- "$@") + +eval set -- "$OPTS" + +RUN_DAEMON=0 +while true; do + case "$1" in + --daemon) RUN_DAEMON=1 ; shift ;; + --) shift ; break ;; + *) ehco "Internal error" ; exit 1 ;; + esac +done + export BROKER_HOME=`cd "$curdir/.."; pwd` export PID_DIR=`cd "$curdir"; pwd` @@ -61,6 +78,11 @@ if [ ! -d $BROKER_LOG_DIR ]; then fi echo `date` >> $BROKER_LOG_DIR/apache_hdfs_broker.out -nohup $LIMIT $JAVA $JAVA_OPTS org.apache.doris.broker.hdfs.BrokerBootstrap "$@" >> $BROKER_LOG_DIR/apache_hdfs_broker.out 2>&1 > $BROKER_LOG_DIR/apache_hdfs_broker.out 2>&1 > $BROKER_LOG_DIR/apache_hdfs_broker.out 2>&1 $pidfile