[ https://issues.apache.org/jira/browse/HADOOP-6421?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eli Collins updated HADOOP-6421: -------------------------------- Attachment: symlink31-common.patch bq. DeletegateToFileSystem. shouldn't createSymlink and getLinkTarget throw an exception? Good catch, they now both throw an IOException indicating symlinks are not supported. For uniformity, I made getFileLinkStatus do the same, and modified createSymlink to pass the IOException up rather than return a boolean. This way if the user tries to create or access a symlink on a file system that does not support them an IOException is thrown in all cases. I also added tests for getLinkTarget and getFileLinkStatus to testUnsupportedSymlink to verify the behavior for each method when links are unsupported. All relevant javadocs updated. bq. FilterFs - typo setTimes() added a blank line. The blank line was already there, the patch removes it. bq. TestLocalFsLink. The following two should be in setUp and tearDown respectively; Fixed. Removed empty method clusterTeardown (was @AfterClass) and added cleanupDirs (@After). bq. TestLocalFsLink. Suggestion: follow the other tests fby setting up a base test and have subclasses that implement the tests for specific file systems. Done. I created FileContextSymlinkBaseTest and made the test classes for the local file system and HDFS extend it. bq. I noticed that the symlink tests for HDFS are significantly more comprehensive. Would it have been possible to share the tests for both file systems using the base and subclasses as in other tests? Yup. With some refactoring I was able to move the bulk of the tests to the common class. It has 33 tests, the local file system class has 4, and the HDFS class now has 13. This uncovered an additional change I needed to make in AbstractFileSystem#rename to avoid throwing a ParentNotDirectoryException if the parent is a symlink. Thanks for the review! I updated the diffs over on HDFS-245 as well. > Symbolic links > -------------- > > Key: HADOOP-6421 > URL: https://issues.apache.org/jira/browse/HADOOP-6421 > Project: Hadoop Common > Issue Type: New Feature > Reporter: Eli Collins > Assignee: Eli Collins > Attachments: symlink-25-common.patch, symlink-26-common.patch, > symlink-26-common.patch, symlink24-common.patch, symlink27-common.patch, > symlink28-common.patch, symlink29-common.patch, symlink29-common.patch, > symlink29-common.patch, symlink30-common.patch, symlink31-common.patch > > > Here's a jira for the common parts of HDFS-245, mostly changes to FileContext > and AbstractFileSystem. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.