You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by Winter <ld...@163.com> on 2018/10/18 11:36:57 UTC

Master-Master Replication problem in hbase2.0

Cluster A and B-both are HDP 3.0.0(hadoop3.0, hbase2.0);
> I want to replicate a table named T(only one CF named 'f') on cluster A and B with each other, that is, the table T data of A changes will be synchronized to B, and the table T data of B changes will be synchronized to A. I configured replication both on Cluster A and B for table T using 'add_peer' and 'enable_table_replication' by Hbase shell(firstly A to B,2ndly B to A).Then,I did test in Hbase shell as below,
> 1.Put a record by typing "put 'T','r1','f:a','1'" on A,then Scan table T,it's no problem,the record can be found on both A and B;
> 2.Put a record by typing "put 'T','r2','f:a','1'" on B,no prwoblem,both found on A and B;
> 3.Put a record by typing "put 'T','r1','f:a','2'" to update the value to '2' on A,no problem, updated successfully on both A and B;
> 4.Put a record by typing "put 'T','r1','f:a','3'" to update the value to '3' on B,no problem, updated successfully on both A and B;
> > 5.Put a record by typing "put 'T','r1','f:a','4'" to update the value to '4' on A,the problem was coming, there is no update both on A and B, that means this 'Put'is not effected,the value is still '3' on A and B although the Hbase shell does not give an error when I 'put'.
> 6.after about 1 minute, I typing this 'Put' again to update the value to '4' on A, now, it's successful, the value is updated to '4' both on A and B.
> Is it a bug in v2.0?May I ask what's the reason? Anything I missed to configure?Thx.



| |
Winter
|
|
邮箱:ldym00@163.com
|

签名由 网易邮箱大师 定制

Re: Master-Master Replication problem in hbase2.0

Posted by Josh Elser <el...@apache.org>.
Please do not cross-post lists. I've dropped dev@hbase.

This doesn't seem like a replication issue. As you have described it, it 
reads more like a data-correctness issue. However, I'd guess that it's 
more related to timestamps rather than be an issue on your cluster.

If there was no error, HBase guarantees that the write was successful. 
If the write was not visible in the cluster after you made it, that must 
mean that it was not the "latest" cell for that row+column.

Use a RAW=>true `scan` the next time you see this. I would guess that 
there was some clock skew on your nodes which left the update in #4 
"masking" the update from #5. With a raw-scan, you should see all of the 
versions of the cell.

On 10/18/18 7:36 AM, Winter wrote:
> Cluster A and B-both are HDP 3.0.0(hadoop3.0, hbase2.0);
>> I want to replicate a table named T(only one CF named 'f') on cluster A and B with each other, that is, the table T data of A changes will be synchronized to B, and the table T data of B changes will be synchronized to A. I configured replication both on Cluster A and B for table T using 'add_peer' and 'enable_table_replication' by Hbase shell(firstly A to B,2ndly B to A).Then,I did test in Hbase shell as below,
>> 1.Put a record by typing "put 'T','r1','f:a','1'" on A,then Scan table T,it's no problem,the record can be found on both A and B;
>> 2.Put a record by typing "put 'T','r2','f:a','1'" on B,no prwoblem,both found on A and B;
>> 3.Put a record by typing "put 'T','r1','f:a','2'" to update the value to '2' on A,no problem, updated successfully on both A and B;
>> 4.Put a record by typing "put 'T','r1','f:a','3'" to update the value to '3' on B,no problem, updated successfully on both A and B;
>>> 5.Put a record by typing "put 'T','r1','f:a','4'" to update the value to '4' on A,the problem was coming, there is no update both on A and B, that means this 'Put'is not effected,the value is still '3' on A and B although the Hbase shell does not give an error when I 'put'.
>> 6.after about 1 minute, I typing this 'Put' again to update the value to '4' on A, now, it's successful, the value is updated to '4' both on A and B.
>> Is it a bug in v2.0?May I ask what's the reason? Anything I missed to configure?Thx.
> 
> 
> 
> | |
> Winter
> |
> |
> 邮箱:ldym00@163.com
> |
> 
> 签名由 网易邮箱大师 定制
>