set_peer_exclude_namespaces
Definition
Sets not replicable namespaces for the replication relationship (peer). Remember the following restrictions:
-
The
REPLICATE_ALL
flag should have thetrue
value in the replication peer configuration (see set_peer_replicate_all). -
Setting an excluded namespace means that all tables in this namespace are not replicated. If the peer configuration already contains some excluded table (added via set_peer_exclude_tableCFs), then setting its namespace with this command is not allowed.
-
If you need to clear excluded namespaces, run the current command with an empty array as the second input parameter. Do not use the remove_peer_namespaces command.
Usage
set_peer_exclude_namespaces '<peer_id>', <namespaces_array[]>
Parameter | Description |
---|---|
peer_id |
A unique identifier of the replication peer. Should not contain hyphens |
namespaces_array |
An array of strings specified in the format |
Examples
Adding excluded namespaces
hbase(main):013:0> set_peer_exclude_namespaces '1', ['ns1', 'ns2'] Took 0.0135 seconds hbase(main):014:0> list_peers PEER_ID CLUSTER_KEY ENDPOINT_CLASSNAME STATE REPLICATE_ALL NAMESPACES TABLE_CFS BANDWIDTH 1 serov-adh-1.ru-central1.internal,serov-adh-2.ru-central1.internal,serov-adh-3.ru-central1.internal:2181:/hbase DISABLED true !ns1;ns2 0 1 row(s) Took 0.0148 seconds => #<Java::JavaUtil::ArrayList:0x7d977a20>
Removing excluded namespaces
hbase(main):017:0> set_peer_exclude_namespaces '1', [] Took 0.0095 seconds hbase(main):018:0> list_peers PEER_ID CLUSTER_KEY ENDPOINT_CLASSNAME STATE REPLICATE_ALL NAMESPACES TABLE_CFS BANDWIDTH 1 serov-adh-1.ru-central1.internal,serov-adh-2.ru-central1.internal,serov-adh-3.ru-central1.internal:2181:/hbase DISABLED true 0 1 row(s) Took 0.0112 seconds => #<Java::JavaUtil::ArrayList:0x71a2df1>