Skip to content

Instantly share code, notes, and snippets.

@b4hand
Last active December 22, 2015 16:59
Show Gist options
  • Save b4hand/6503308 to your computer and use it in GitHub Desktop.
Save b4hand/6503308 to your computer and use it in GitHub Desktop.
Completely wipes a pseudo-distributed HBase environment.
#!/bin/sh
service hbase-regionserver stop
service hbase-master stop
echo -e "rmr /hbase\nquit" | hbase zkcli
sudo -u hdfs hadoop fs -rm -r /hbase
sudo -u hdfs hadoop fs -mkdir /hbase
sudo -u hdfs hadoop fs -chown hbase /hbase
service hbase-regionserver start
service hbase-master start
@b4hand
Copy link
Author

b4hand commented Dec 16, 2013

This script assumes a standard CDH deployment of a pseudo-distributed HBase installation and will completely nuke and pave it. I've used it in pseudo-distributed test environments to clean up a locked up master or regionserver. Obviously, you don't want to use this in a production environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment