Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions bin/hbase-cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ if [ "$zparent" == "null" ]; then zparent="/hbase"; fi
hrootdir=`$bin/hbase org.apache.hadoop.hbase.util.HBaseConfTool hbase.rootdir`
if [ "$hrootdir" == "null" ]; then hrootdir="file:///tmp/hbase-${USER}/hbase"; fi

hbasewaldir=`$bin/hbase org.apache.hadoop.hbase.util.HBaseConfTool hbase.wal.dir`

check_for_znodes() {
command=$1;
case $command in
Expand Down Expand Up @@ -102,10 +104,16 @@ clean_up() {
;;
--cleanHdfs)
execute_hdfs_command "-rm -R ${hrootdir}"
if [ "${hbasewaldir}" != "null" ]; then
execute_hdfs_command "-rm -R ${hbasewaldir}"
fi
;;
--cleanAll)
execute_zk_command "deleteall ${zparent}";
execute_hdfs_command "-rm -R ${hrootdir}"
if [ "${hbasewaldir}" != "null" ]; then
execute_hdfs_command "-rm -R ${hbasewaldir}"
fi
;;
--cleanAcls)
execute_clean_acls;
Expand Down