diff --git a/bin/hbase-daemon.sh b/bin/hbase-daemon.sh index 6c895e9040..3ea7bfdf51 100755 --- a/bin/hbase-daemon.sh +++ b/bin/hbase-daemon.sh @@ -68,6 +68,11 @@ hbase_rotate_log () if [ -n "$2" ]; then num=$2 fi + + if [ ! -f "$log" ] && [ -f "$log.0" ]; then #for some jdk, gc log has a suffix (.0) + mv -f "$log.0" "$log"; + fi + if [ -f "$log" ]; then # rotate logs while [ $num -gt 1 ]; do prev=`expr $num - 1`