You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Ted Yu (JIRA)" <ji...@apache.org> on 2011/09/05 16:04:10 UTC

[jira] [Issue Comment Edited] (HBASE-2195) Support cyclic replication

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

Ted Yu edited comment on HBASE-2195 at 9/5/11 2:02 PM:
-------------------------------------------------------

If we look at Bytes.readByteArray():
{noformat}
  public static byte [] readByteArray(final DataInput in)
  throws IOException {
    int len = WritableUtils.readVInt(in);
    if (len < 0) {
      throw new NegativeArraySizeException(Integer.toString(len));
    }
{noformat}
we can see that if the new version field is declared as int, we should be able to serialize it as VInt.
What remains is to customize Bytes.readByteArray() a little bit to fit the needs for this JIRA.

Long term, I think the mapping from single byte cluserid to uuid clusterid should be designed/implemented first. This aligns with Lars' effort of writing the UUID conditionally.

      was (Author: yuzhihong@gmail.com):
    If we look at Bytes.readByteArray():
{noformat}
  public static byte [] readByteArray(final DataInput in)
  throws IOException {
    int len = WritableUtils.readVInt(in);
    if (len < 0) {
      throw new NegativeArraySizeException(Integer.toString(len));
    }
{noformat}
we can see that if the new version field (declared as int), we should be able to serialize it as VInt.
What remains is to customize Bytes.readByteArray() a little bit to fit the needs for this JIRA.

Long term, I think the mapping from single byte cluserid to uuid clusterid should be designed/implemented first. This aligns with Lars' effort of writing the UUID conditionally.
  
> 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
>         Attachments: 2195-v5.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