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

Zheng Hu commented on HBASE-19665:
----------------------------------

I try to implement peer storage & queue storage by sharing an single 
hbase:replication meta table whose rowkey is queueId: 
1.  for peer storage,  I use  peer:config & peer:state column to store  peer 
configuration and peer state; 
2.  for queue storage,  I use  columns : 
        a. rs:{region-server-name}  to store <queueId, rs> mapping, the value 
in cell is byte[0], which is meaningless. 
        b. wal:{region-server-name}  to store wals under rs with 
region-server-name for the specific queue with queueId.  the value of cell is a 
byte array which encoded the <filename, position> pair. 
        c.  regions:{encoded-region-name} to store the latest pushed sequence 
id  for serial replication.  
3. for hfile-refs,  I use column hfile-refs:{hfile-name} to store hfiles .

But when running the UT TestReplicationStateBasic, I found  some problems: 
1.  after call removeQueue(serverName, queueId),   the mapping <queueId, rs> 
for column rs:{region-server-name}  will be removed.  Then if we try to call 
getListOfReplicators to list all regionserver for the queue,  we'll miss the 
previous region server ( whose server name is serverName) because  there's no 
cell in  rs:serverName ... 

In Zookeeper storage, the path layer is  
/hbase/replication/rs/www.example.com.132341:10248/queue-id ,   so even though 
the queue was removed, the rs is still remained. 

Finally,  I decided to separate the peer storage and queue storage into two 
diff  tables : hbase:peer  & hbase:replication_queue.   the logic will be 
totally separate and  unambiguous, though we add two additional hbase tables 
for replication. 







> Add table based replication peers/queues storage back
> -----------------------------------------------------
>
>                 Key: HBASE-19665
>                 URL: https://issues.apache.org/jira/browse/HBASE-19665
>             Project: HBase
>          Issue Type: Sub-task
>          Components: Replication
>            Reporter: Guanghao Zhang
>            Assignee: Zheng Hu
>            Priority: Major
>         Attachments: HBASE-19665.v1.patch
>
>
> We removed them after HBASE-19397. So open a issue to track this thing. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to