hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-17317) [branch-1] The updatePeerConfig method in ReplicationPeersZKImpl didn't update the table-cfs map
Date Tue, 20 Dec 2016 14:09:58 GMT

    [ https://issues.apache.org/jira/browse/HBASE-17317?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15764295#comment-15764295
] 

Hudson commented on HBASE-17317:
--------------------------------

SUCCESS: Integrated in Jenkins build HBase-1.4 #571 (See [https://builds.apache.org/job/HBase-1.4/571/])
HBASE-17317 [branch-1] The updatePeerConfig method in (zghao: rev 97d1ba401503d5ec504087b6cd3e93995fa21b7b)
* (edit) hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeersZKImpl.java
* (edit) hbase-server/src/test/java/org/apache/hadoop/hbase/client/replication/TestReplicationAdmin.java


> [branch-1] The updatePeerConfig method in ReplicationPeersZKImpl didn't update the table-cfs
map
> ------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-17317
>                 URL: https://issues.apache.org/jira/browse/HBASE-17317
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 1.4.0
>            Reporter: Guanghao Zhang
>            Assignee: Guanghao Zhang
>         Attachments: HBASE-17317-branch-1.patch
>
>
> The updatePeerConfig method in ReplicationPeersZKImpl.java
> {code}
>   @Override
>   public void updatePeerConfig(String id, ReplicationPeerConfig newConfig)
>     throws ReplicationException {
>     ReplicationPeer peer = getPeer(id);
>     if (peer == null){
>       throw new ReplicationException("Could not find peer Id " + id);
>     }   
>     ReplicationPeerConfig existingConfig = peer.getPeerConfig();
>     if (newConfig.getClusterKey() != null && !newConfig.getClusterKey().isEmpty()
&&
>         !newConfig.getClusterKey().equals(existingConfig.getClusterKey())){
>       throw new ReplicationException("Changing the cluster key on an existing peer is
not allowed."
>           + " Existing key '" + existingConfig.getClusterKey() + "' does not match new
key '"
>           + newConfig.getClusterKey() +
>       "'");
>     }   
>     String existingEndpointImpl = existingConfig.getReplicationEndpointImpl();
>     if (newConfig.getReplicationEndpointImpl() != null &&
>         !newConfig.getReplicationEndpointImpl().isEmpty() &&
>         !newConfig.getReplicationEndpointImpl().equals(existingEndpointImpl)){
>       throw new ReplicationException("Changing the replication endpoint implementation
class " +
>           "on an existing peer is not allowed. Existing class '"
>           + existingConfig.getReplicationEndpointImpl()
>           + "' does not match new class '" + newConfig.getReplicationEndpointImpl() +
"'");
>     }   
>     //Update existingConfig's peer config and peer data with the new values, but don't
touch config
>     // or data that weren't explicitly changed
>     existingConfig.getConfiguration().putAll(newConfig.getConfiguration());
>     existingConfig.getPeerData().putAll(newConfig.getPeerData());
>    // Bug. We should update table-cfs map, too.
>     try {
>       ZKUtil.setData(this.zookeeper, getPeerNode(id),
>           ReplicationSerDeHelper.toByteArray(existingConfig));
>     }   
>     catch(KeeperException ke){
>       throw new ReplicationException("There was a problem trying to save changes to the
" +
>           "replication peer " + id, ke);
>     }   
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message