[
https://issues.apache.org/jira/browse/HBASE-8352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13633162#comment-13633162
]
Tsz Wo (Nicholas), SZE commented on HBASE-8352:
-----------------------------------------------
{quote}
> If 2.0.5-alpha is the underlying hdfs, I think accessing .snapshot dir would
> not be allowed.
I thought hdfs snapshots dirs are readable and browseable just like normal
dirs. Only direct write operations would be blocked. Is this incorrect?
{quote}
Jonathan, you are right that snapshot dirs are readable and browseable. Let me
clarify this:
With snapshot feature, dirs can be set as _snapshottable_ and snapshots can
only be taken on snapshottable dirs. Once a dir (say /foo) is snapshottable,
".snapshot" is used for accessing snapshot and the usual API/CLI will work for
it, e.g.
- show all snapshots of foo
{noformat}
fs -ls /foo/.snapshot
{noformat}
- list the file in snapshot s0
{noformat}
fs -ls /foo/.snapshot/s0
{noformat}
- copy a file inside s0 to /tmp
{noformat}
fs -cp /foo/.snapshot/s0/bar.txt /tmp
{noformat}
For non-snapshottable dir (say /bar), /bar/.snapshot is an non-existing file.
That's why Ted got file not found from CLI.
> Rename '.snapshot' directory
> ----------------------------
>
> Key: HBASE-8352
> URL: https://issues.apache.org/jira/browse/HBASE-8352
> Project: HBase
> Issue Type: Bug
> Reporter: Ted Yu
> Assignee: Ted Yu
> Priority: Blocker
> Fix For: 0.98.0, 0.94.7, 0.95.1
>
> Attachments: 8352-0.94-v1.txt, 8352-0.94-v2.txt, 8352-trunk.txt,
> 8352-trunk-v2.txt
>
>
> Testing HBase Snapshot on top of Hadoop's Snapshot branch
> (http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-2802/), we found
> that both features used '.snapshot' directory to store metadata.
> HDFS (built from HDFS-2802 branch) doesn't allow paths with .snapshot as a
> component
> From discussion on [email protected], (see
> http://search-hadoop.com/m/kY6C3cXMs51), consensus was to rename '.snapshot'
> directory in HBase so that both features can co-exist smoothly.
--
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