append_peer_tableCFs
Definition
Appends replicable tables/column families to the specified replication relationship (peer). Remember the following restrictions:
-
The
REPLICATE_ALL
flag should have thefalse
value in the replication peer configuration (see set_peer_replicate_all). -
If the peer configuration already contains some namespace (added via append_peer_namespaces or set_peer_namespaces), then setting its tables with this command is not allowed.
NOTE
This command does not remove the previously defined tables/column families from the replication peer configuration (unlike set_peer_tableCFs).
|
Usage
append_peer_tableCFs '<peer_id>',
{'[<namespace_name>:]<table_name>' => <column_families_array[]>[,...]}
Parameter | Description |
---|---|
peer_id |
A unique identifier of the replication peer. Should not contain hyphens |
namespace_name |
A namespace name |
table_name |
A table name |
column_families_array |
An array of strings specified in the format |
Examples
Successful table appending
Without column families
hbase(main):037:0> show_peer_tableCFs '1' default.articles Took 0.0077 seconds => "default.articles" hbase(main):042:0> append_peer_tableCFs '1', {'table10' => []} Took 0.0079 seconds hbase(main):043:0> show_peer_tableCFs '1' default.articles;default.table10 Took 0.0033 seconds => "default.articles;default.table10"
Unsuccessful table appending
hbase(main):057: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 false ns1 default.articles 0 1 row(s) Took 0.0112 seconds => #<Java::JavaUtil::ArrayList:0x1ba7db2a> hbase(main):058:0> append_peer_tableCFs '1', {'ns1:temp2' => []} ERROR: java.io.IOException: Table-cfs ns1:temp2 is conflict with namespaces ns1 in peer config at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:472) 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) Caused by: org.apache.hadoop.hbase.replication.ReplicationException: Table-cfs ns1:temp2 is conflict with namespaces ns1 in peer config at org.apache.hadoop.hbase.master.replication.ReplicationManager.checkNamespacesAndTableCfsConfigConflict(ReplicationManager.java:181) at org.apache.hadoop.hbase.master.replication.ReplicationManager.checkPeerConfig(ReplicationManager.java:148) at org.apache.hadoop.hbase.master.replication.ReplicationManager.updatePeerConfig(ReplicationManager.java:103) at org.apache.hadoop.hbase.master.HMaster.updateReplicationPeerConfig(HMaster.java:3535) at org.apache.hadoop.hbase.master.MasterRpcServices.updateReplicationPeerConfig(MasterRpcServices.java:1943) 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) ... 3 more Append a replicable table-cf config for the specified peer Examples: # append a table / table-cf to be replicable for a peer hbase> append_peer_tableCFs '2', { "ns1:table4" => ["cfA", "cfB"]} Took 8.1481 seconds