hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jiraposter@reviews.apache.org (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-2195) Support cyclic replication
Date Wed, 07 Sep 2011 23:20:12 GMT

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

jiraposter@reviews.apache.org commented on HBASE-2195:
------------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/1730/
-----------------------------------------------------------

(Updated 2011-09-07 23:19:53.225308)


Review request for hbase, Ted Yu, Michael Stack, and Jean-Daniel Cryans.


Changes
-------

Hopefully the last iteration.
Integrated Ted's optimization for ReplicationSource.removeNonReplicableEdits.
Better tests. Now tests Master - Master and a Cycle between 3 clusters.


Summary
-------

For Master <-> Master replication (as well as cycles > 2) a replication sink needs
to keep track who is was the originator of a change and
(1) do not replicate this data back to the originator and
(2) pass that information on to the next link in a cycle > 2

In order to do that, HlogKeys read from the WAL are tagged with the Cluster UUID at the ReplicationSource
before the logs are shipped to the Sink. The sink writes the Cluster UUID into the WAL log
(in HlogKey, so only once per edit). If the sink is also source for yet another sink the ClusterUUID
is retained in the HLogKeys read from the local WAL and passed on to the sink.


This addresses bug HBASE-2195.
    https://issues.apache.org/jira/browse/HBASE-2195


Diffs (updated)
-----

  http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/HConstants.java
1166212 
  http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/Delete.java
1166212 
  http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/Put.java
1166212 
  http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/replication/ReplicationAdmin.java
1166212 
  http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
1166212 
  http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java
1166212 
  http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogKey.java
1166212 
  http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/replication/ReplicationZookeeper.java
1166212 
  http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSink.java
1166212 
  http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
1166212 
  http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java
1166212 
  http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestHLogMethods.java
1166212 
  http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestHLogSplit.java
1166212 
  http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestWALActionsListener.java
1166212 
  http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/replication/TestMasterReplication.java
PRE-CREATION 
  http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationSource.java
1166212 
  http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestReplicationSink.java
1166212 
  http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestReplicationSourceManager.java
1166212 

Diff: https://reviews.apache.org/r/1730/diff


Testing
-------

All tests pass.
New test: TestMasterReplication (which tests Master <-> Master, but no cycles > 2,
yet), also passes.
Manually tested a cycle between 3 clusters.


Thanks,

Lars



> Support cyclic replication
> --------------------------
>
>                 Key: HBASE-2195
>                 URL: https://issues.apache.org/jira/browse/HBASE-2195
>             Project: HBase
>          Issue Type: Sub-task
>          Components: replication
>            Reporter: Jean-Daniel Cryans
>            Assignee: Lars Hofhansl
>         Attachments: 2195-v10.txt, 2195-v5.txt, 2195-v6.txt, 2195.txt
>
>
> We need to support cyclic replication by using the cluster id of each HlogKey and stop
replicating when it goes back to the original cluster.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message