HBASE-19492 (addendum) Add EXCLUDE_NAMESPACE and EXCLUDE_TABLECFS support to replication peer config

Signed-off-by: zhangduo <zhangduo@apache.org>
This commit is contained in:
Guanghao Zhang 2017-12-20 18:23:20 +08:00 committed by zhangduo
parent d2534fc570
commit cae5c2706b
1 changed files with 3 additions and 2 deletions

View File

@ -137,9 +137,10 @@ public class ReplicationManager {
checkNamespacesAndTableCfsConfigConflict(peerConfig.getExcludeNamespaces(),
peerConfig.getExcludeTableCFsMap());
} else {
if ((peerConfig.getExcludeNamespaces() != null && !peerConfig.getNamespaces().isEmpty())
if ((peerConfig.getExcludeNamespaces() != null
&& !peerConfig.getExcludeNamespaces().isEmpty())
|| (peerConfig.getExcludeTableCFsMap() != null
&& !peerConfig.getTableCFsMap().isEmpty())) {
&& !peerConfig.getExcludeTableCFsMap().isEmpty())) {
throw new ReplicationException(
"Need clean exclude-namespaces or exclude-table-cfs config firstly"
+ " when replicate_all flag is false");