You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Sun Xin (Jira)" <ji...@apache.org> on 2019/11/26 11:19:00 UTC

[jira] [Created] (HBASE-23345) Table need to replication unless all of cfs are excluded

Sun Xin created HBASE-23345:
-------------------------------

             Summary: Table need to replication unless all of cfs are excluded
                 Key: HBASE-23345
                 URL: https://issues.apache.org/jira/browse/HBASE-23345
             Project: HBase
          Issue Type: Bug
          Components: Replication
            Reporter: Sun Xin


ReplicationPeerConfig.needToReplicate return false, when replicateAllUserTables is true and excludeTableCFsMap contains part of cfs.

Should judge by whether all of cfs are excluded.
{code:java}
public boolean needToReplicate(TableName table) {
  if (replicateAllUserTables) {
    if (excludeNamespaces != null && excludeNamespaces.contains(table.getNamespaceAsString())) {
      return false;
    }
    if (excludeTableCFsMap != null && excludeTableCFsMap.containsKey(table)) {
      return false;
    }
    return true;
  } else {
    if (namespaces != null && namespaces.contains(table.getNamespaceAsString())) {
      return true;
    }
    if (tableCFsMap != null && tableCFsMap.containsKey(table)) {
      return true;
    }
    return false;
  }
}
{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)