[
https://issues.apache.org/jira/browse/HBASE-16868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16217995#comment-16217995
]
Guanghao Zhang commented on HBASE-16868:
----------------------------------------
bq. if I create a peer with no namespace/table, we will set replicate_all flag
automatically?
Yes.
bq. And then if you add namespace/table to this peer, the operation will fail
as you need to manually set the replicate_all flag to false first?
Yes. Need use "set_peer_replicate_all '1', false" first. Then append namespace
or tablecfs to the peer.
bq. what is the behavior for an empty peer with a false replicate_all flag
If the replicate_all flag is false and no namespace/tablecfs config, the peer
will replicate nothing.
bq. is it allowed to set replicate_all flag to true for a peer which already
has namespace/table
Not allowed. It will throw new ReplicationException("Need clean namespaces or
table-cfs config fisrtly when you want replicate all cluster").
bq. But I think you need to fix the rubocop and ruby-lint violations
I open a issue HBASE-18956 for this. Let me try to fix more warnings.
bq. The only concern for me is that we need to give a very clear behavior, and
also the best practice on how to config a peer.
I will update the release note more clearly. Thanks.
> 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
>
>
> 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)