[ https://issues.apache.org/jira/browse/HADOOP-8957?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chris Nauroth updated HADOOP-8957: ---------------------------------- Attachment: HADOOP-8957.patch The attached patch fixes multiple bugs in ViewFS when running on Windows. I'd like to start the patch on trunk and then immediately merge to branch-trunk-win after commit. Here is a summary of the changes: # AbstractFileSystem.isValidName was catching file names with ':' as invalid. This is not correct on a local file system on Windows, where ':' is valid in a drive specification. To fix this, I refactored isValidName such that only HDFS (and not other file systems like local) enforce these rules. I added new tests to check that this worked. I also enhanced a test in TestDFSUtil. # ChRootedFs was calling Path.toString and then trimming the first character to remove the first slash. On Windows, if the Path has a drive specification, then toString removes the first slash. Instead, we can use Path.toUri().getPath(). # ViewFileSystem.InternalDirOfViewFs.getFileStatus contained a call to Path.makeQualified with a null working directory. This throws NullPointerException if the default URI is not absolute. This condition can happen on Windows, where the tree of paths can transition from absolute to relative to absolute. (/ is absolute, /C: is relative, and /C:/foo is absolute.) To fix this, we can resolve against / for the working directory instead of null. > FileContext.getFileContext causes multiple test failures on Windows due to > InvocationTargetException > ---------------------------------------------------------------------------------------------------- > > Key: HADOOP-8957 > URL: https://issues.apache.org/jira/browse/HADOOP-8957 > Project: Hadoop Common > Issue Type: Bug > Components: fs > Affects Versions: 3.0.0, trunk-win > Reporter: Chris Nauroth > Assignee: Chris Nauroth > Attachments: HADOOP-8957.patch > > > This appears to be a problem with parsing a Windows-specific path, ultimately > throwing InvocationTargetException from AbstractFileSystem.newInstance. -- 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