hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eli Collins (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-1845) symlink comes up as directory after namenode restart
Date Tue, 19 Apr 2011 17:14:05 GMT

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

Eli Collins commented on HDFS-1845:
-----------------------------------

The fix in INode.java looks good. 

In the test you can't successfully access a symlink via FileSystem as symlinks are only implmented
in FileContext (this is why TestCheckpoint is failing). You need to use FileContext#getFileLinkStatus
as you want to check the isSymlink property (and getFileStatus will resolve the link).

Nit: no need for the writeLink and checkLink utility methods since they are/can be 1-liners.




> symlink comes up as directory after namenode restart
> ----------------------------------------------------
>
>                 Key: HDFS-1845
>                 URL: https://issues.apache.org/jira/browse/HDFS-1845
>             Project: Hadoop HDFS
>          Issue Type: Bug
>    Affects Versions: 0.22.0
>            Reporter: John George
>            Assignee: John George
>             Fix For: 0.22.0
>
>         Attachments: HDFS-1845-apache-2.patch, HDFS-1845-apache.patch
>
>
> When a symlink is first created, it get added to EditLogs. When namenode is restarted,
it reads from this editlog and represents a symlink correctly and saves this information to
its image. If the namenode is restarted again, it reads its from this FSImage, but thinks
that a symlink is a directory. This is because it uses "Block[] blocks" to determine if an
INode is a directory, a file, or symlink. Since both a directory and a symlink has blocks
as null, it thinks that a symlink is a directory.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message