Hey,
The Master and RegionServer both participate in online merges. When the request to merge is sent to the Master, the Master moves the regions to be merged to the same RegionServer, usually the one where the region with the higher load resides. The Master then requests the RegionServer to merge the two regions. The RegionServer processes this request locally. Once the two regions are merged, the new region will be online and available for server requests, and the old regions are taken offline.
For merging two consecutive regions use the following command:
hbase> merge_region 'ENCODED_REGIONNAME', 'ENCODED_REGIONNAME'
For merging regions that are not adjacent, passing 'true' as the third parameter forces the merge:
hbase> merge_region 'ENCODED_REGIONNAME', 'ENCODED_REGIONNAME', true