ddupg commented on a change in pull request #2969:
URL: https://github.com/apache/hbase/pull/2969#discussion_r580014771



##########
File path: 
hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeerConfig.java
##########
@@ -314,7 +320,8 @@ public boolean needToReplicate(TableName table) {
       Collection<String> cfs = excludeTableCFsMap.get(table);
       // if cfs is null or empty then we can make sure that we do not need to 
replicate this table,
       // otherwise, we may still need to replicate the table but filter out 
some families.
-      return cfs != null && !cfs.isEmpty();
+      return cfs != null && !cfs.isEmpty()
+        && (family == null || !cfs.contains(Bytes.toString(family)));

Review comment:
       I added more comment about what changed.

##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/NamespaceTableCfWALEntryFilter.java
##########
@@ -18,27 +18,17 @@
 
 package org.apache.hadoop.hbase.replication;
 
-import java.util.List;
-import java.util.Map;
 import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.CellUtil;
 import org.apache.hadoop.hbase.TableName;
-import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.wal.WAL.Entry;
 import org.apache.hadoop.hbase.wal.WALEdit;
 import org.apache.yetus.audience.InterfaceAudience;
 
 /**
- * Filter a WAL Entry by the peer config: replicate_all flag, namespaces 
config, table-cfs config,

Review comment:
       The behaviour described here is same with what 
ReplicationPeerConfig#needToReplicate does, so I just deleted the description.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to