If you see this error on HBase
Region //regionname// on HDFS but not listed in .META or deployed on any server
then use the add_regions.rb script to have this fixed.
Normally hbase errors can be fixed by hbase hbck -fix
But this approach works mostly in cases where the region is listed in .META but not assigned etc.
In such cases, the script add_regions.rb comes to our rescue. It can be used as follows:
hbase org.jruby.Main add_regions.rb //full-path-region-on-HDFS/.regioninfo
This will add the region to the .META. table. Next assign the region to a region-server. To do this , launch hbase shell and issue the command
assign 'full-region-name'
on the hbase shell.
The full region-name includes the standard format tablename.startrowkey.timestamp.md5sum.
The dot at the end is important and should be included while passing to the assign command.
Now run hbase hbck again and look at status 'simple' on the shell. Your region numbers should have increased according to the regions you have added now. The errors related to not listed in .META should be gone now.
Region //regionname// on HDFS but not listed in .META or deployed on any server
then use the add_regions.rb script to have this fixed.
Normally hbase errors can be fixed by hbase hbck -fix
But this approach works mostly in cases where the region is listed in .META but not assigned etc.
In such cases, the script add_regions.rb comes to our rescue. It can be used as follows:
hbase org.jruby.Main add_regions.rb //full-path-region-on-HDFS/.regioninfo
This will add the region to the .META. table. Next assign the region to a region-server. To do this , launch hbase shell and issue the command
assign 'full-region-name'
on the hbase shell.
The full region-name includes the standard format tablename.startrowkey.timestamp.md5sum.
The dot at the end is important and should be included while passing to the assign command.
Now run hbase hbck again and look at status 'simple' on the shell. Your region numbers should have increased according to the regions you have added now. The errors related to not listed in .META should be gone now.
No comments:
Post a Comment