Support Questions
Find answers, ask questions, and share your expertise

Watch region merge progress in HBase

Solved Go to solution
Highlighted

Watch region merge progress in HBase

New Contributor

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

Accepted Solutions
Highlighted

Re: Watch region merge progress in HBase

New Contributor

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

Re: Watch region merge progress in HBase

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.

Highlighted

Re: Watch region merge progress in HBase

New Contributor

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

Highlighted

Re: Watch region merge progress in HBase

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.

Highlighted

Re: Watch region merge progress in HBase

New Contributor

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.

Highlighted

Re: Watch region merge progress in HBase

New Contributor

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