hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nspiegelb...@apache.org
Subject svn commit: r1181395 - /hbase/branches/0.89/bin/hbase-daemon.sh
Date Tue, 11 Oct 2011 02:04:59 GMT
Author: nspiegelberg
Date: Tue Oct 11 02:04:59 2011
New Revision: 1181395

URL: http://svn.apache.org/viewvc?rev=1181395&view=rev
Log:
Force use of 'mv -f' when moving aside hbase logfiles

Summary:
We saw a case where the hbase startup script wouldn't finish because it
couldn't move logfiles out of the way, and would throw the session into
interactive mode.

The problem is caused because the script uses 'mv' with no arguments, and so it
will inherit any shell aliases for the default. This changes 'mv' to 'mv -f'

Test Plan:
No longer thrown into interactive mode, and the files are moved out of the way.

DiffCamp Revision: 165208
Reviewed By: mwelty
Commenters: kannan
CC: mwelty, kannan, gsmyth
Revert Plan:
OK

Modified:
    hbase/branches/0.89/bin/hbase-daemon.sh

Modified: hbase/branches/0.89/bin/hbase-daemon.sh
URL: http://svn.apache.org/viewvc/hbase/branches/0.89/bin/hbase-daemon.sh?rev=1181395&r1=1181394&r2=1181395&view=diff
==============================================================================
--- hbase/branches/0.89/bin/hbase-daemon.sh (original)
+++ hbase/branches/0.89/bin/hbase-daemon.sh Tue Oct 11 02:04:59 2011
@@ -64,10 +64,10 @@ hbase_rotate_log ()
     if [ -f "$log" ]; then # rotate logs
     while [ $num -gt 1 ]; do
         prev=`expr $num - 1`
-        [ -f "$log.$prev" ] && mv "$log.$prev" "$log.$num"
+        [ -f "$log.$prev" ] && mv -f "$log.$prev" "$log.$num"
         num=$prev
     done
-    mv "$log" "$log.$num";
+    mv -f "$log" "$log.$num";
     fi
 }
 



Mime
View raw message