split
Definition
Splits the entire table or the specified Region into two new Regions.
Usage
split '[<namespace_name>:]<table_name>' | '<region_name>'[,
'<split_key>']
Parameter | Description |
---|---|
namespace_name |
A namespace name |
table_name |
A table name |
region_name |
A Region name without its encoded part. For example, if the full Region name is |
split_key |
The row key value for dividing the table into two parts |
Examples
Splitting a Region
hbase(main):005:0> list_regions 'people_ages' SERVER_NAME | REGION_NAME | START_KEY | END_KEY | SIZE | REQ | LOCALITY | -------------------------------------------------- | ------------------------------------------------------------- | ---------- | ---------- | ----- | ----- | ---------- | bds-adh-3.ru-central1.internal,16020,1642400781435 | people_ages,,1638455640269.6375fc55e8ad8f9948b22cfcc34a4563. | | F | 0 | 238 | 1.0 | bds-adh-3.ru-central1.internal,16020,1642400781435 | people_ages,F,1638455640269.508ad2a04ec106517eaa8ec6fd01fe83. | F | K | 0 | 218 | 1.0 | bds-adh-1.ru-central1.internal,16020,1642400781296 | people_ages,K,1638455640269.42f95f9f14c8345d2c9940ea68fc7c30. | K | P | 0 | 195 | 1.0 | bds-adh-1.ru-central1.internal,16020,1642400781296 | people_ages,P,1638455640269.edf909e0f6785817b4517f044a3ebfd4. | P | W | 0 | 254 | 1.0 | bds-adh-2.ru-central1.internal,16020,1642400781522 | people_ages,W,1638455640269.bc245646e72b0dcf1a06ca061ed538f4. | W | | 0 | 92 | 1.0 | 5 rows Took 0.0332 seconds hbase(main):006:0> split 'people_ages,P,1638455640269', 'S' Took 0.2193 seconds hbase(main):007:0> list_regions 'people_ages' SERVER_NAME | REGION_NAME | START_KEY | END_KEY | SIZE | REQ | LOCALITY | -------------------------------------------------- | ------------------------------------------------------------- | ---------- | ---------- | ----- | ----- | ---------- | bds-adh-3.ru-central1.internal,16020,1642400781435 | people_ages,,1638455640269.6375fc55e8ad8f9948b22cfcc34a4563. | | F | 0 | 238 | 1.0 | bds-adh-3.ru-central1.internal,16020,1642400781435 | people_ages,F,1638455640269.508ad2a04ec106517eaa8ec6fd01fe83. | F | K | 0 | 218 | 1.0 | bds-adh-1.ru-central1.internal,16020,1642400781296 | people_ages,K,1638455640269.42f95f9f14c8345d2c9940ea68fc7c30. | K | P | 0 | 195 | 1.0 | bds-adh-1.ru-central1.internal,16020,1642400781296 | people_ages,P,1642431183346.3636b23eae41ba162fde908cb245d325. | P | S | 0 | 0 | 1.0 | bds-adh-1.ru-central1.internal,16020,1642400781296 | people_ages,S,1642431183346.f3a24f3f04bd9d126d8f30fe40e466a9. | S | W | 0 | 0 | 1.0 | bds-adh-2.ru-central1.internal,16020,1642400781522 | people_ages,W,1638455640269.bc245646e72b0dcf1a06ca061ed538f4. | W | | 0 | 92 | 1.0 | 6 rows Took 0.0355 seconds
Splitting a table
hbase(main):013: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,,1638430003108.36ee4f69dc1ab9d4a075091ff9ea3b80. | | | 0 | 0 | 1.0 | 1 rows Took 0.0159 seconds hbase(main):016:0> split 'BEST_BOOKS', 'K' Took 0.1780 seconds hbase(main):017: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.0164 seconds