HBase
What causes the issue that data can’t be written into or read from a certain HBase table, and several regions are shown as ‘region in transaction’ on the WebUI interface?
This issue usually results from a region being stuck in the process of splitting or migrating. You can locate the corresponding RegionServer node and restart the service through the command “service hbase-regionserver restart”.
If the status persists after the restart, you may need to sequentially restart the Hmaster services of master1 and master2. The command for this operation is
service hbase-master restart
Why can’t a region be found when reading or writing data?
When retrieving a record using the row key, a NotServingRegionException exception may thrown. This problem can be addressed by the following steps:
- Check if there are any regions with ‘rit’ status on the web interface
- Use the ‘hbase hbck’ command to inspect the abnormal status
- Use the ‘hbase hbck’ command to perform repairs
Here is an example:
ERROR:Region{meta=\>inventoryIBCF,304801,1465002356884.93d89fdd4546546f0d52041773b495bc.,hdfs=\>hdfs://Ucluster/hbase/data/default/inventoryIBCF/93d89fdd4546546f0d52041773b495bc,
deployed =\> , repli caId =\> 0 } not deployed on any region server.
You can use the following command to repair
hbase hbck -fixAssignments
More repair commands can be viewed with the following command. Simply execute the repair statement corresponding to the error found.
hbase hbck --help
If this problem frequently occurs, it may be due to inappropriate parameter settings or other aspects of HBase, in which case some adjustments are needed.