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

Teruyoshi Zenmyo commented on HBASE-3134:
-----------------------------------------

{quote}
It should be changed too, originally it wasn't used by multiple threads because 
there was a maximum of one peer. Just to be safe.
{quote}
I think it is better to remove the peerStateTrackers and manage peers with one 
HashMap(the peerClusters) by moving the PeerStateTracker to ReplicationPeer. 
Then the peerCluster should be fixed to be thread safe.

{quote}
It seems that ReplicationSourceManager.addPeer needs some changes too
{quote}
Is it about ReplicationSourceManager.addSource?
{code}
 public ReplicationSourceInterface addSource(String id) throws IOException {
    ReplicationSourceInterface src =
        getReplicationSource(this.conf, this.fs, this, stopper, replicating, 
id);
    // TODO set it to what's in ZK
    src.setSourceEnabled(true);
    synchronized (this.hlogsById) {
{code}
The sourceEnabled and ReplicationPeer.peerEnabled seem to have a same role. Can 
the sourceEnable be removed?

{quote}
Basically when a peer exists but peer state znode doesn't exist, we should add 
the peer state znode.
{quote}
I will fix this in the next patch.

                
> [replication] Add the ability to enable/disable streams
> -------------------------------------------------------
>
>                 Key: HBASE-3134
>                 URL: https://issues.apache.org/jira/browse/HBASE-3134
>             Project: HBase
>          Issue Type: New Feature
>          Components: replication
>            Reporter: Jean-Daniel Cryans
>            Assignee: Teruyoshi Zenmyo
>            Priority: Minor
>              Labels: replication
>             Fix For: 0.94.0
>
>         Attachments: 3134-v2.txt, 3134.txt, HBASE-3134.patch, 
> HBASE-3134.patch, HBASE-3134.patch, HBASE-3134.patch
>
>
> This jira was initially in the scope of HBASE-2201, but was pushed out since 
> it has low value compared to the required effort (and when want to ship 
> 0.90.0 rather soonish).
> We need to design a way to enable/disable replication streams in a 
> determinate fashion.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to