Cluster Replication Security Commands

Let’s study about Cluster Replication Security Commands in hbase,

Cluster Replication Commands

Cluster Replication commands are used to work with cluster set up mode in HBase.


* It is used for adding and removing peers to cluster.

* It will start and stop replication in cluster set up mode.

Below table explains the list of cluster replication commands.

CommandFunctionality and example
add_peerIt will add peers to cluster to replicate.

Ex: hbase> add_peer ‘2’, zk1,zk2:2182:/hbase-prod

remove_peerDeletes all the metadata information about the peer.

Ex: hbase> remove_peer ‘1’

start_replicationRestarts all the replication features.

Ex: hbase>start_replication

stop_replicationStops all the replication features.

Ex: hbase>stop_replication

enable_table_replicationIt enables the table replication.

Ex: hbase >enable_table_replication ‘t1’

disable_table_replicationIt will pause HBase cluster replication.

Ex: hbase>disable_table_replication ‘t1’

status replicationThis will prints the status of each source and its sinks, sorted by host name.
list_peersList all replication relationships known by the cluster in hbase.

Ex: hbase> list_peers

status ‘replication’, ‘sink’Prints the status for each replication sink, sorted by host name.
status ‘replication’, ‘source’Prints the status for each replication source, sorted by hostname.

Security Commands

In Hbase there are few commands which provide security to the hbase users.

Let us study security commands one by one.

1. Grant

Using grant command we can specify the permission like read, write, create, execute, and admin to the hbase users.


hbase> grant <user> <permissions> [<table> [<column family> [<column; qualifier>]]


In this example will provide all privilege to the user called “beyonduser”.

hbase(main)> grant ‘beyonduser’, ‘RWXCA’


RRead privilege
WWrite privilege
XExecute privilege
CCreate privilege
AAdmin privilege
2. Revoke

Using this command we can get back all the permissions given to the hbase users.


hbase> revoke <user>


In the previous example we granted all the RWXCA permission to the user, here will get back all the permissions from the” beyonduser”.

hbase(main)> revoke ‘beyonduser’
3. User_permission

The user_permission command shows all access permissions for the current user for a given table.


hbase> user_permission ‘tablename’


In this example it will display the list of permission for the “beyondemp” table.

hbase(main)> user_permission ‘beyondemp’