remove_rsgroup

Definition

Removes the given Region Server group.

CAUTION
All servers and tables should be removed from the Region Server group before this operation.

Usage

remove_rsgroup '<rsgroup_name>'
Arguments
Parameter Description

rsgroup_name

A Region Server group name

Examples

Attempt to remove a group with tables

hbase(main):018:0> remove_rsgroup 'test_group'

ERROR: org.apache.hadoop.hbase.constraint.ConstraintException: RSGroup test_group has 2 tables; you must remove these tables from the rsgroup before the rsgroup can be removed.
        at org.apache.hadoop.hbase.rsgroup.RSGroupAdminServer.removeRSGroup(RSGroupAdminServer.java:460)
        at org.apache.hadoop.hbase.rsgroup.RSGroupAdminEndpoint$RSGroupAdminServiceImpl.removeRSGroup(RSGroupAdminEndpoint.java:254)
        at org.apache.hadoop.hbase.protobuf.generated.RSGroupAdminProtos$RSGroupAdminService.callMethod(RSGroupAdminProtos.java:13885)
        at org.apache.hadoop.hbase.master.MasterRpcServices.execMasterService(MasterRpcServices.java:816)
        at org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos$MasterService$2.callBlockingMethod(MasterProtos.java)
        at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:413)
        at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:130)
        at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:324)
        at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:304)

Remove a RegionServer group.

  hbase> remove_rsgroup 'my_group'


Took 0.0049 seconds
hbase(main):019:0> move_tables_rsgroup 'default', ['t4', 'temp1']
Took 2.2508 seconds

Attempt to remove a group with servers

hbase(main):020:0> remove_rsgroup 'test_group'

ERROR: org.apache.hadoop.hbase.constraint.ConstraintException: RSGroup test_group has 1 servers; you must remove these servers from the RSGroup beforethe RSGroup can be removed.
        at org.apache.hadoop.hbase.rsgroup.RSGroupAdminServer.removeRSGroup(RSGroupAdminServer.java:466)
        at org.apache.hadoop.hbase.rsgroup.RSGroupAdminEndpoint$RSGroupAdminServiceImpl.removeRSGroup(RSGroupAdminEndpoint.java:254)
        at org.apache.hadoop.hbase.protobuf.generated.RSGroupAdminProtos$RSGroupAdminService.callMethod(RSGroupAdminProtos.java:13885)
        at org.apache.hadoop.hbase.master.MasterRpcServices.execMasterService(MasterRpcServices.java:816)
        at org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos$MasterService$2.callBlockingMethod(MasterProtos.java)
        at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:413)
        at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:130)
        at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:324)
        at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:304)

Remove a RegionServer group.

  hbase> remove_rsgroup 'my_group'


Took 0.0042 seconds
hbase(main):022:0> move_servers_rsgroup 'default', ['bds-adh-3.ru-central1.internal:16020']
Took 1.0126 seconds

Removing a group without servers and tables

hbase(main):023:0> remove_rsgroup 'test_group'
Took 0.1284 seconds
hbase(main):024:0> list_rsgroups
NAME                     SERVER / TABLE
 default                 server bds-adh-1.ru-central1.internal:16020
                         server bds-adh-2.ru-central1.internal:16020
                         server bds-adh-3.ru-central1.internal:16020
                         table hbase:meta
                         table hbase:acl
                         table SYSTEM.CATALOG
                         table ns1:temp2
                         table t4
                         table t5
                         table t6
                         table hbase:labels
                         table temp1
                         table hbase:namespace
                         table SYSTEM.SEQUENCE
                         table SYSTEM.LOG
                         table SYSTEM.FUNCTION
                         table SYSTEM.MUTEX
                         table SYSTEM.STATS
                         table hbase:rsgroup
1 row(s)
Took 0.0097 seconds
Found a mistake? Seleсt text and press Ctrl+Enter to report it