You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Elliott Clark (JIRA)" <ji...@apache.org> on 2013/08/06 21:43:48 UTC

[jira] [Comment Edited] (HBASE-9141) Replication Znodes Backup Tool

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

Elliott Clark edited comment on HBASE-9141 at 8/6/13 7:42 PM:
--------------------------------------------------------------

I tested this on a local filesystem and hdfs with some replication znodes. 

A successful Backup run:
{code}
bin/hbase org.apache.hadoop.hbase.replication.ReplicationZnodesBackup -p myBackup
Backup Znodes file is: hdfs://localhost:41020/hbase-0.94/myBackup/replication-znodes-backup
SUCCESSFULLY SERIALIZED 3 replication znodes.
{code}

On the zkcli console, I do a ls of replication znode:
{code}
[zk: localhost:2181(CONNECTED) 1] ls /hbase/replication
[peers, rs]
{code}
Then, I delete the /hbase/replication znode
{code}
[zk: localhost:2181(CONNECTED) 3] rmr /hbase/replication
[zk: localhost:2181(CONNECTED) 4] ls /hbase/replication
Node does not exist: /hbase/replication
{code}

Then, I restore the znode using the backup script. A successful Restore run:
{code}
 bin/hbase org.apache.hadoop.hbase.replication.ReplicationZnodesBackup -restore -p myBackup
Backup Znodes file is: hdfs://localhost:41020/hbase-0.94/myBackup/replication-znodes-backup
SUCCESSFULLY RESTORED 3 replication znodes.
{code}

{code}
[zk: localhost:2181(CONNECTED) 5] ls /hbase/replication
[peers, rs]
{code}

Edited (eclark): formatting by request.
                
      was (Author: v.himanshu):
    I tested this on a local filesystem and hdfs with some replication znodes. 

A successful Backup run:
{code}
bin/hbase org.apache.hadoop.hbase.replication.ReplicationZnodesBackup -p myBackup
Backup Znodes file is: hdfs://localhost:41020/hbase-0.94/myBackup/replication-znodes-backup
SUCCESSFULLY SERIALIZED 3 replication znodes.

On the zkcli console, I do a ls of replication znode:
{code}
[zk: localhost:2181(CONNECTED) 1] ls /hbase/replication
[peers, rs]
{code}
Then, I delete the /hbase/replication znode
{code}
[zk: localhost:2181(CONNECTED) 3] rmr /hbase/replication
[zk: localhost:2181(CONNECTED) 4] ls /hbase/replication
Node does not exist: /hbase/replication
{code}

Then, I restore the znode using the backup script. A successful Restore run:
{code}
 bin/hbase org.apache.hadoop.hbase.replication.ReplicationZnodesBackup -restore -p myBackup
Backup Znodes file is: hdfs://localhost:41020/hbase-0.94/myBackup/replication-znodes-backup
SUCCESSFULLY RESTORED 3 replication znodes.
{code}

{code}
[zk: localhost:2181(CONNECTED) 5] ls /hbase/replication
[peers, rs]
{code}
                  
> 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
>             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