From 80c7e4ea7994186ab1876bb53bd7239d2559a481 Mon Sep 17 00:00:00 2001 From: Guanghao Zhang Date: Tue, 26 Dec 2017 20:56:56 +0800 Subject: [PATCH] HBASE-19621 (addendum) Revisit the methods in ReplicationPeerConfigBuilder --- .../hbase/replication/ReplicationPeersZKImpl.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeersZKImpl.java b/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeersZKImpl.java index 2f6d52c4b8d..289d2aa954e 100644 --- a/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeersZKImpl.java +++ b/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeersZKImpl.java @@ -363,9 +363,14 @@ public class ReplicationPeersZKImpl extends ReplicationStateZKBase implements Re } // Update existingConfig's peer config and peer data with the new values, but don't touch config // or data that weren't explicitly changed - ReplicationPeerConfigBuilder builder = ReplicationPeerConfig.newBuilder(newConfig); - builder.putAllConfiguration(existingConfig.getConfiguration()); - builder.putAllPeerData(existingConfig.getPeerData()); + ReplicationPeerConfigBuilder builder = ReplicationPeerConfig.newBuilder(existingConfig); + builder.putAllConfiguration(newConfig.getConfiguration()) + .putAllPeerData(newConfig.getPeerData()) + .setReplicateAllUserTables(newConfig.replicateAllUserTables()) + .setNamespaces(newConfig.getNamespaces()).setTableCFsMap(newConfig.getTableCFsMap()) + .setExcludeNamespaces(newConfig.getExcludeNamespaces()) + .setExcludeTableCFsMap(newConfig.getExcludeTableCFsMap()) + .setBandwidth(newConfig.getBandwidth()); try { ZKUtil.setData(this.zookeeper, getPeerNode(id),