[ 
https://issues.apache.org/jira/browse/HBASE-16868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16261946#comment-16261946
 ] 

Guanghao Zhang commented on HBASE-16868:
----------------------------------------

This replicate_all flag is useful to avoid misuse of replication peer config. 
And on our cluster we have more config: EXCLUDE_NAMESPACE and EXCLUDE_TABLECFS 
for replication peer. Let me tell more about our use case. We have two online 
serve cluster and one offline cluster for MR/Spark job. For online cluster, all 
tables will replicate to each other. And not all tables will replicate to 
offline cluster, because not all tables need OLAP job. We have hundreds of 
tables and if only one table don't need replicate to offline cluster, then you 
will config a lot of tables in replication peer config. So we add a new config 
option is EXCLUDE_TABLECFS. Then you only need config one table (which don't 
need replicate) in EXCLUDE_TABLECFS.

Then when the replicate_all flag is false, you can config NAMESPACE or TABLECFS 
means which namespace/tables need replicate to peer cluster. When replicate_all 
flag is true, you can config EXCLUDE_NAMESPACE or EXCLUDE_TABLECFS means which 
namespace/tables can't replicate to peer cluster. I plan contribute this to 
2.0, too. Any comments for this? [~ashish singhi]





> Add a replicate_all flag to avoid misuse the namespaces and table-cfs config 
> of replication peer
> ------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-16868
>                 URL: https://issues.apache.org/jira/browse/HBASE-16868
>             Project: HBase
>          Issue Type: Improvement
>          Components: Replication
>    Affects Versions: 2.0.0, 3.0.0
>            Reporter: Guanghao Zhang
>            Assignee: Guanghao Zhang
>            Priority: Critical
>             Fix For: 2.0.0-beta-1
>
>         Attachments: HBASE-16868.master.001.patch, 
> HBASE-16868.master.002.patch, HBASE-16868.master.003.patch, 
> HBASE-16868.master.004.patch, HBASE-16868.master.005.patch, 
> HBASE-16868.master.006.patch, HBASE-16868.master.007.patch, 
> HBASE-16868.master.008.patch
>
>
> First add a new peer by shell cmd.
> {code}
> add_peer '1', CLUSTER_KEY => "server1.cie.com:2181:/hbase".
> {code}
> If we don't set namespaces and table cfs in peer config. It means replicate 
> all tables to the peer cluster.
> Then append a table to the peer config.
> {code}
> append_peer_tableCFs '1', {"table1" => []}
> {code}
> Then this peer will only replicate table1 to the peer cluster. It changes to 
> replicate only one table from replicate all tables in the cluster. It is very 
> easy to misuse in production cluster. So we should avoid appending table to a 
> peer which replicates all table.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to