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

Aaron T. Myers commented on HDFS-5102:
--------------------------------------

Here's an example of the problem. Note that the snapshot name "/snapshot1" 
begins with a "/" character:

{noformat}
[02:13:40] $ sudo -u hdfs -E hadoop fs -mkdir -p /a/b
[02:14:32] $ sudo -u hdfs -E hdfs dfsadmin -allowSnapshot /a
Allowing snaphot on /a succeeded
[02:15:07] $ sudo -u hdfs -E hadoop fs -createSnapshot /a snapshot0
Created snapshot /a/.snapshot/snapshot0
[02:15:30] $ sudo -u hdfs -E hadoop fs -createSnapshot /a /snapshot1
Created snapshot /a/.snapshot/snapshot1
[02:15:39] $ sudo -u hdfs -E hadoop fs -ls /a/.snapshot
Found 2 items
drwxr-xr-x   - hdfs supergroup          0 2013-08-15 14:15 
/a/.snapshot/snapshot0
drwxr-xr-x   - hdfs supergroup          0 2013-08-15 14:15 
/a/.snapshot/snapshot1
[02:15:50] $ sudo -u hdfs -E hadoop fs -ls /a/.snapshot/snapshot0
Found 1 items
drwxr-xr-x   - hdfs supergroup          0 2013-08-15 14:14 
/a/.snapshot/snapshot0/b
[02:15:56] $ sudo -u hdfs -E hadoop fs -ls /a/.snapshot/snapshot1
ls: `/a/.snapshot/snapshot1': No such file or directory
{noformat}
                
> Snapshot names should not be allowed to contain slash characters
> ----------------------------------------------------------------
>
>                 Key: HDFS-5102
>                 URL: https://issues.apache.org/jira/browse/HDFS-5102
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: snapshots
>    Affects Versions: 2.1.0-beta
>            Reporter: Aaron T. Myers
>
> Snapshots of a snapshottable directory are allowed to have arbitrary names. 
> Presently, if you create a snapshot with a snapshot name that begins with a 
> "/" character, this will be allowed, but later attempts to access this 
> snapshot will fail because of the way the {{Path}} class deals with 
> consecutive "/" characters. I suggest we disallow "/" from appearing in 
> snapshot names.
> An example of this is in the first comment on this JIRA.

--
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