Last active
          December 22, 2015 16:59 
        
      - 
      
 - 
        
Save b4hand/6503308 to your computer and use it in GitHub Desktop.  
    Completely wipes a pseudo-distributed HBase environment.
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/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 | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
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.