Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Watch region merge progress in HBase

avatar
Explorer

Hello,

I need to watch the progress of a region merge task in HBase 1.2 . I need it to use it on a script, so I would prefer a solution that works best through linux shell and not Web UI.

Regards

1 ACCEPTED SOLUTION

avatar
Explorer

In the end it was a lot easier. I am monitoring the existence of the original regions right after the merge_region command. When both regions are gone, this can be considered as a sign that the merge is complete. Of course the regions can disappear due to another reason (maybe an automatic split) but for the specific task it covers my needs.

View solution in original post

5 REPLIES 5

avatar
Super Guru

Region merging is an asynchronous process in HBase.

Your only option is to read and parse the relevant data in hbase:meta, and use this to determine when both daughter Regions that you requested to be merged together are combined into a single parent Region.

avatar
Explorer

Thank you Josh!

Exactly, merging is asynchronous indeed, thus the need to monitor when it's completed, so that I know when Ican submit the next merge request without overloading the system.

I saw there is the command list_procedures. Do you think this can be used to monitor any non-completed merge processes?

If not, is there an easy way to parse the hbase:meta through shell to obtain the required info? What should I look for? If I am getting it right, I should see all three regions while merge is active (one new + two old) and just the new one when it will have completed. So, when the two old regions are no longer present, merge can be considered completed. Does that sounds correct? Of course, I would prefer to just use a simpler command, like list_processes, if it is applicable.

Regards

avatar
Super Guru

Easy way to parse meta? Probably not :). At least, not "easy" in comparison to what you'd expect from our public API. It's definitely doable, but will require a little digging on your part.

Not sure the exact version of HBase you're using. You may have some luck with list_procedures, but hard to say off the cuff.

avatar
Explorer

Thanks Josh! I will give it a try in the next couple of days (need to build a test environment first) and return with results.

avatar
Explorer

In the end it was a lot easier. I am monitoring the existence of the original regions right after the merge_region command. When both regions are gone, this can be considered as a sign that the merge is complete. Of course the regions can disappear due to another reason (maybe an automatic split) but for the specific task it covers my needs.