major_compact

Definition

Runs Major compaction for the defined table/Region/column family. See also compact.

Usage

major_compact '[<namespace_name>:]<table_name>' | '<region_name>' | '<encoded_region_name>'[,
              '<column_family>' | nil[,
              '<compact_type>']]
Arguments
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 wordcount2,m,1637833871529.2ff3683a90c4106432c540ddd0f57cba., then the region_name is wordcount2,m,1637833871529. You can get the full Region name and exclude its encoded part via the list_regions command output (the REGION_NAME field)

encoded_region_name

An encoded part of the 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)

column_family

A column family name

compact_type

Possible values:

  • NORMAL — normal compaction;

  • MOB — MOB (medium-sized objects) compaction.

The default value is NORMAL. See more details in the HBase documentation

Examples

Table

hbase(main):031:0> major_compact 'ns1:temp2'
Took 0.0349 seconds

Column family (within a table)

hbase(main):032:0> major_compact 'ns1:temp2', 'cf1'
Took 0.0175 seconds

Region

hbase(main):033:0> major_compact 'wordcount2,m,1637833871529'
Took 0.0179 seconds
hbase(main):034:0> major_compact '2ff3683a90c4106432c540ddd0f57cba'
Took 0.0105 seconds

Column family (within a Region)

hbase(main):035:0> major_compact '2ff3683a90c4106432c540ddd0f57cba', 'f'
Took 0.0125 seconds
Found a mistake? Seleсt text and press Ctrl+Enter to report it