sandeepvinayak commented on a change in pull request #2778:
URL: https://github.com/apache/hbase/pull/2778#discussion_r543049473
##########
File path:
hbase-client/src/main/java/org/apache/hadoop/hbase/client/replication/ReplicationPeerConfigUtil.java
##########
@@ -455,36 +458,45 @@ public static ReplicationPeerConfig
appendTableCFsToReplicationPeerConfig(
/**
* Helper method to add base peer configs from Configuration to
ReplicationPeerConfig
- * if not present in latter.
*
* This merges the user supplied peer configuration
* {@link org.apache.hadoop.hbase.replication.ReplicationPeerConfig} with
peer configs
* provided as property hbase.replication.peer.base.configs in hbase
configuration.
- * Expected format for this hbase configuration is "k1=v1;k2=v2,v2_1".
Original value
- * of conf is retained if already present in ReplicationPeerConfig.
+ * Expected format for this hbase configuration is "k1=v1;k2=v2,v2_1".
*
* @param conf Configuration
* @return ReplicationPeerConfig containing updated configs.
*/
- public static ReplicationPeerConfig
addBasePeerConfigsIfNotPresent(Configuration conf,
+ public static ReplicationPeerConfig
updateReplicationBasePeerConfigs(Configuration conf,
ReplicationPeerConfig receivedPeerConfig) {
- String basePeerConfigs = conf.get(HBASE_REPLICATION_PEER_BASE_CONFIG, "");
+ String removeBasePeerConfigs =
conf.get(HBASE_REPLICATION_PEER_REMOVE_BASE_CONFIG, "");
ReplicationPeerConfigBuilder copiedPeerConfigBuilder =
ReplicationPeerConfig.
newBuilder(receivedPeerConfig);
- Map<String,String> receivedPeerConfigMap =
receivedPeerConfig.getConfiguration();
+ // remove the peer configurations specified in the conf
Review comment:
That's a good point. Ideally IMO, the peer configuration should also not
be added from the region server restart. We should have a better home for this
(may be master restart?).
@virajjasani Do you think if it is standard to have conf upgrade before the
HBase rolling upgrade? If not, we might need to rework on updating the peer
configs
----------------------------------------------------------------
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:
[email protected]