The HBase cluster in the current environment is a DR cluster. Due to some reasons, the active and standby clusters need to be switched over. That is, the standby cluster becomes the active cluster, and the active cluster becomes the standby cluster.
After the active and standby clusters are switched over, data cannot be written to the original active cluster, and the original standby cluster becomes the active cluster to take over upper-layer services.
Ensuring that upper-layer services are stopped
Disabling the write function of the active cluster
kinit hbase
hbase shell
set_clusterState_standby
The command is run successfully if the following information is displayed:
hbase(main):001:0> set_clusterState_standby => true
Checking whether the active/standby synchronization is complete
status 'replication'
Disabling synchronization between the active and standby clusters
list_peers
remove_peer 'Standby cluster ID'
Example:
remove_peer '1'
list_replicated_tables
disable_table_replication 'Table name'
Example:
disable_table_replication 't1'
Performing an active/standby switchover