private void checkNamespacesAndTableCfsConfigConflict(Set<String> namespaces,
    Map<TableName, ? extends Collection<String>> tableCfs) throws DoNotRetryIOException {
    if (namespaces == null || namespaces.isEmpty()) {
      return;
    }
    if (tableCfs == null || tableCfs.isEmpty()) {
      return;
    }
    for (Map.Entry<TableName, ? extends Collection<String>> entry : tableCfs.entrySet()) {
      TableName table = entry.getKey();
      if (namespaces.contains(table.getNamespaceAsString())) {
        throw new DoNotRetryIOException("Table-cfs " + table + " is conflict with namespaces "
          + table.getNamespaceAsString() + " in peer config");
      }
    }
  }
Set a namespace in the peer config means that all tables in this namespace will be replicated
to the peer cluster.
<ol>
<li>If peer config already has a namespace, then not allow set any table of this namespace to
the peer config.</li>
<li>If peer config already has a table, then not allow set this table's namespace to the peer
config.</li>
</ol>
<p>
Set a exclude namespace in the peer config means that all tables in this namespace can't be
replicated to the peer cluster.
<ol>
<li>If peer config already has a exclude namespace, then not allow set any exclude table of
this namespace to the peer config.</li>
<li>If peer config already has a exclude table, then not allow set this table's namespace as a
exclude namespace.</li>
</ol>
hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/ReplicationPeerManager.java