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

Himanshu Vashishtha commented on HBASE-9141:
--------------------------------------------

bq. I haven't tried it but I don't see the check in the code, it just tries to 
create the znodes in recreateZnodes(). Have you tried it?

Yes, I have tested it locally. It calls createWithParents, so if a znode is 
already there, it will not re-create it. 
We may update the data in case there is some error while creating 
(https://github.com/apache/hbase/blob/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java#L446),
 but given the use case here, we would be deleting before restoring the backup 
so it should be safe.

bq. Can we not rely on having the user doing it and move them aside for them?
There is no api to "move" znodes in ZK. A user can pass a "-d" 
(deleteOriginalZnodes) flag to delete the current znodes after taking the 
backup. See the help comment above.

bq. Are you saying this because it needs to read the old format?
Yes. Thinking more, testing with new format would be good too. Let me write one.

Will also take care of nits mentioned by Ted and JD in the next version.
                
> Replication Znodes Backup Tool
> ------------------------------
>
>                 Key: HBASE-9141
>                 URL: https://issues.apache.org/jira/browse/HBASE-9141
>             Project: HBase
>          Issue Type: Improvement
>          Components: migration, Replication
>    Affects Versions: 0.94.10
>            Reporter: Himanshu Vashishtha
>            Assignee: Himanshu Vashishtha
>             Fix For: 0.95.2
>
>         Attachments: HBase-9141.patch
>
>
> While migrating to 0.96, we recommend deleting old znodes so users not face 
> issues like HBASE-7766, and let HBase create them out of box.
> Though HBase tends to store only ephemeral data in zookeeper, replication has 
> a different approach. Almost all of its data (state, peer info, logs, etc) is 
> present in zookeeper. We would like to preserve them in order to not do 
> re-adding of peers, and ensuring complete replication after we have migrated 
> to 0.96. 
> This jira adds a tool to serialize/de-serialize replication znodes to the 
> underlying filesystem. This could be used while migrating to 0.96.0.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to