hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bus...@apache.org
Subject hbase git commit: HBASE-13927 Allow hbase-daemon.sh to conditionally redirect the log or not
Date Mon, 06 Jul 2015 17:01:42 GMT
Repository: hbase
Updated Branches:
  refs/heads/master d26978a2f -> 608c3aa15


HBASE-13927 Allow hbase-daemon.sh to conditionally redirect the log or not

Signed-off-by: Sean Busbey <busbey@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/608c3aa1
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/608c3aa1
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/608c3aa1

Branch: refs/heads/master
Commit: 608c3aa15c34b9014f99e857b374645db58cbbe3
Parents: d26978a
Author: Elliott Clark <eclark@apache.org>
Authored: Wed Jun 17 11:48:45 2015 -0700
Committer: Sean Busbey <busbey@apache.org>
Committed: Mon Jul 6 11:48:36 2015 -0500

----------------------------------------------------------------------
 bin/hbase-daemon.sh | 27 +++++++++++++++++++--------
 1 file changed, 19 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/608c3aa1/bin/hbase-daemon.sh
----------------------------------------------------------------------
diff --git a/bin/hbase-daemon.sh b/bin/hbase-daemon.sh
index fa5c9fd..7164bcf 100755
--- a/bin/hbase-daemon.sh
+++ b/bin/hbase-daemon.sh
@@ -202,15 +202,26 @@ case $startStop in
   ;;
 
 (foreground_start)
-    # Add to the command log file vital stats on our environment.
-    echo "`date` Starting $command on `hostname`" >> ${HBASE_LOGLOG}
-    echo "`ulimit -a`" >> "$HBASE_LOGLOG" 2>&1
-    # in case the parent shell gets the kill make sure to trap signals.
-    # Only one will get called. Either the trap or the flow will go through.
     trap cleanAfterRun SIGHUP SIGINT SIGTERM EXIT
-    nice -n $HBASE_NICENESS "$HBASE_HOME"/bin/hbase \
-        --config "${HBASE_CONF_DIR}" \
-        $command "$@" start >> ${HBASE_LOGOUT} 2>&1 &
+    if [ "$HBASE_NO_REDIRECT_LOG" != "" ]; then
+        # NO REDIRECT
+        echo "`date` Starting $command on `hostname`"
+        echo "`ulimit -a`"
+        # in case the parent shell gets the kill make sure to trap signals.
+        # Only one will get called. Either the trap or the flow will go through.
+        nice -n $HBASE_NICENESS "$HBASE_HOME"/bin/hbase \
+            --config "${HBASE_CONF_DIR}" \
+            $command "$@" start &
+    else
+        echo "`date` Starting $command on `hostname`" >> ${HBASE_LOGLOG}
+        echo "`ulimit -a`" >> "$HBASE_LOGLOG" 2>&1
+        # in case the parent shell gets the kill make sure to trap signals.
+        # Only one will get called. Either the trap or the flow will go through.
+        nice -n $HBASE_NICENESS "$HBASE_HOME"/bin/hbase \
+            --config "${HBASE_CONF_DIR}" \
+            $command "$@" start >> ${HBASE_LOGOUT} 2>&1 &
+    fi
+    # Add to the command log file vital stats on our environment.
     hbase_pid=$!
     echo $hbase_pid > ${HBASE_PID}
     wait $hbase_pid


Mime
View raw message