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

Chris Nauroth commented on HADOOP-9984:
---------------------------------------

bq. I think rather than path.toString(), we want another %N there.

Good idea.  I see Andrew has given you some code review feedback, so I won't 
bother uploading a new version with this small change.  I'll assume you'll fold 
it into your next version.

The new test {{SymlinkBaseTest#testListingDirectoryWithDanglingSymlinks}} will 
fail on Windows when run against the local file system.  That means when run 
through the subclasses {{TestSymlinkLocalFSFileContext}} and 
{{TestSymlinkLocalFSFileSystem}}.  On Windows, the local file system does not 
support dangling symlinks, and without dangling symlinks, there is no way for 
the test to do anything meaningful.

The background on this is that Windows requires a different API call depending 
on if you're creating a symlink-to-file vs. symlink-to-directory, and if the 
target doesn't exist, then we can't reliably determine which API to call.  Full 
history is in HADOOP-9043 and HADOOP-527.

We've been skipping tests covering dangling symlinks on Windows with the local 
file system by overriding methods in the subclasses to do 
{{assumeTrue(!WINDOWS)}}.  For example, see 
{{TestSymlinkLocalFS#testCreateDanglingLink}}.  Doing it this way guarantees 
that we skip the test on Windows with local file system, but still run the test 
on Windows with non-local file systems, such as the HDFS test suites.

> FileSystem#globStatus and FileSystem#listStatus should resolve symlinks by 
> default
> ----------------------------------------------------------------------------------
>
>                 Key: HADOOP-9984
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9984
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 2.1.0-beta
>            Reporter: Colin Patrick McCabe
>            Assignee: Colin Patrick McCabe
>            Priority: Blocker
>         Attachments: HADOOP-9984.001.patch, HADOOP-9984.003.patch, 
> HADOOP-9984.005.patch, HADOOP-9984.007.patch, HADOOP-9984.009.patch, 
> HADOOP-9984.010.patch, HADOOP-9984.011.patch
>
>
> During the process of adding symlink support to FileSystem, we realized that 
> many existing HDFS clients would be broken by listStatus and globStatus 
> returning symlinks.  One example is applications that assume that 
> !FileStatus#isFile implies that the inode is a directory.  As we discussed in 
> HADOOP-9972 and HADOOP-9912, we should default these APIs to returning 
> resolved paths.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to