Repair HBase table (unassigned region in transition)

Mario,

So one of the reasons why a region gets stuck in transition is because, when it is being moved across regionservers, it is unassigned from the source regionserver but is never assigned to another regionserver. One fix that always works for me is by forcibly ASSIGNing it from the hbase shell by :-

assign regionName

I tried to do forceful assignment of regions, but it didn't work for me. I tried following and it worked:

Steps:

  • Disable table from hbase shell
  • Run hbck to fix problmes using following command

    sudo -u hbase hbase hbck -repair

  • Enable table from hbase shell


If your HBase version is recent enough you might also try hbck -repairHoles instead of just -repair. That did the trick for me on a recent "fix the hole" problem.