HBase can be a little tricky to understand, especially when talking about fixing.
There are 2 basic ways to fix things in HBase :
Hbase hbck
First try to run hbase hbck to see if there are inconsistencies.
If so, run a simple
will most of the time fix things up (regions assigments).[root@sandbox ~]# sudo -u hbase hbase hbck -fix
There are a lot of options hbase hbck -help, useful ones could be hbase hbck -repair (which goes with a lot of repairs options) and hbase hbck -fixTableLocks for fixing tables locked for a long time
Recovering .META
There’s a jar shipped with HBase which can helps recovering .META lost from fs only.
To do so :
[hbase@sandbox root]$ hbase org.apache.hadoop.hbase.util.hbck.OfflineMetaRepair -base /hadoop/hbase -details