merge_region

Definition

Merges two Regions. Takes full or encoded Region names as input.

Usage

merge_region '<full_region_name1>' | '<encoded_region_name1>',
             '<full_region_name2>' | '<encoded_region_name2>'[,
             '<force_merge>']
Arguments
Parameter Description

full_region_name1

A full name of the first Region. Can be obtained via the list_regions command output (the REGION_NAME field)

encoded_region_name1

An encoded part of the first Region name. For example, if the full Region name is wordcount2,m,1637833871529.2ff3683a90c4106432c540ddd0f57cba., then the encoded part is 2ff3683a90c4106432c540ddd0f57cba. You can get the full Region name and obtain its encoded part via the list_regions command output (the REGION_NAME field)

full_region_name2

A full name of the second Region

encoded_region_name2

An encoded part of the second Region name

force_merge

Use true to force the merge process, even if not adjacent Regions are passed (for experts only)

Examples

hbase(main):001:0> list_regions 'BEST_BOOKS'
                                        SERVER_NAME |                                                  REGION_NAME |  START_KEY |    END_KEY |  SIZE |   REQ |   LOCALITY |
 -------------------------------------------------- | ------------------------------------------------------------ | ---------- | ---------- | ----- | ----- | ---------- |
 bds-adh-2.ru-central1.internal,16020,1642400781522 |  BEST_BOOKS,,1642431463389.dc0dd6bee8c1b1d7db462a17fbd33673. |            |          K |     0 |     0 |        1.0 |
 bds-adh-2.ru-central1.internal,16020,1642400781522 | BEST_BOOKS,K,1642431463389.d6e6be2ad047bc3f2ea5ed6842f851b0. |          K |            |     0 |     0 |        1.0 |
 2 rows
Took 0.5506 seconds
hbase(main):002:0> merge_region 'BEST_BOOKS,,1642431463389.dc0dd6bee8c1b1d7db462a17fbd33673.', 'BEST_BOOKS,K,1642431463389.d6e6be2ad047bc3f2ea5ed6842f851b0.'
Took 0.1575 seconds
hbase(main):004:0> list_regions 'BEST_BOOKS'
                                        SERVER_NAME |                                                 REGION_NAME |  START_KEY |    END_KEY |  SIZE |   REQ |   LOCALITY |
 -------------------------------------------------- | ----------------------------------------------------------- | ---------- | ---------- | ----- | ----- | ---------- |
 bds-adh-2.ru-central1.internal,16020,1642400781522 | BEST_BOOKS,,1642432455266.182c4a28649924be67aba3eeb9d15a04. |            |            |     0 |     0 |        1.0 |
 1 rows
Took 0.0185 seconds
Found a mistake? Seleсt text and press Ctrl+Enter to report it