HBASE-3126 Force use of 'mv -f' when moving aside hbase logfiles

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1029177 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jonathan Gray 2010-10-30 20:10:31 +00:00
parent 72fc484a8f
commit add2f82ca7
2 changed files with 3 additions and 2 deletions

View File

@ -1075,6 +1075,7 @@ Release 0.21.0 - Unreleased
that are partitioned on time
HBASE-2253 Show Block cache hit ratio for requests where
cacheBlocks=true
HBASE-3126 Force use of 'mv -f' when moving aside hbase logfiles
NEW FEATURES

View File

@ -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
}