Hbase Merge Multiple region

Source: Internet
Author: User

Let's say your table has 10 region and their names are 1,2...10.

Hbase does not provide a direct merge 2-8 of these 7 region methods, if you want to merge multiple region, it is a little more trouble, the method is as follows

First, use the Merge_region method that comes with the hbase shell:

Merge the regions. Passing ' true ' as the optional third parameter would force
A merge (' force ' merges regardless else merge would fail unless passed
Adjacent regions. "Force" is a for-expert use only).


Note:you must pass the encoded region name, the
This command was a little different from and region operations. The encoded
Region name was the hash suffix on region names:e.g. If the region name were
testtable,0094429456,1289497600452.527db22f95c8a9e0116f0cc13c680396. Then
The encoded region name portion is 527db22f95c8a9e0116f0cc13c680396


Examples:


hbase> merge_region ' encoded_regionname ', ' encoded_regionname '
hbase> merge_region ' encoded_regionname ', ' encoded_regionname ', true

Merging multiple region with the Merge_region method will generate a new region, but there will be 2 issues

1:overlap (HBase metadata information not processed)

The region information on the 2:HDFS was not processed.

To resolve both issues, you can use the HBase hbck command, for example:

HBase hbck Ssp_rt-fixhdfsoverlaps-maxmerge 100-fixmeta-fixassignments

This command merges the region of overlap in hbase metadata and deletes the corresponding file on HDFs


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.