hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matteo Bertozzi (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-6233) [brainstorm] snapshots: hardlink alternatives
Date Tue, 26 Jun 2012 06:37:43 GMT

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

Matteo Bertozzi commented on HBASE-6233:

Yes on "Take snapshot" you rename the hfile to .snapshot/files directory and replace it with
a symlink.
Also you need to create a symlink in .snapshot/name/ folder (the one that describe the snapshot).
When you want to restore you have just to create a symlink of the file.

I see two advantages for using this approach:
One is code remain unchanged fs.delete() stay fs.delete() (all the "symlink" code is done
in takeSnapshot() and nothing change from the hbase point of view)

The other one is: 
 * hbase 0.96 ship with snapshots (hardlink alternative)
 * hbase 0.98 ship with snapshot + hdfs hardlink
If you use the approach that I've described a user that have taken snapshots using 0.96 doesn't
have to do nothing special to migrate to 0.98. symlink to .snapshot/files/ keeps to work.
And the future 'take snapshot' just create hardlink in .snapshot/name/ and restore as another
hardlink against .snapshot/name

In the other case (take the exception and retry) you need to keep the logic in 0.98 or do
some fancy script that search for the "Reference" files and replace with the hardlink.
> [brainstorm] snapshots: hardlink alternatives
> ---------------------------------------------
>                 Key: HBASE-6233
>                 URL: https://issues.apache.org/jira/browse/HBASE-6233
>             Project: HBase
>          Issue Type: Brainstorming
>            Reporter: Matteo Bertozzi
>            Assignee: Matteo Bertozzi
> Discussion ticket around snapshots and hardlink alternatives.
> (See the HDFS-3370 discussion about hardlink and implementation problems)
> (taking for a moment WAL out of the discussion and focusing on hfiles)
> With hardlinks available taking snapshot will be fairly easy:
> * (hfiles are immutable)
> * hardlink to .snapshot/name to take snapshot
> * hardlink from .snapshot/name to restore the snapshot
> * No code change needed (on fs.delete() only one reference is deleted)
> but we don't have hardlinks, what are the alternatives?

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message