diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/ReplicationManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/ReplicationManager.java index 749448d4dfd..f36b2e27113 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/ReplicationManager.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/ReplicationManager.java @@ -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");