You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Ivan Mitic (JIRA)" <ji...@apache.org> on 2012/06/07 00:27:25 UTC

[jira] [Updated] (HADOOP-8409) Address Hadoop path related issues on Windows

     [ https://issues.apache.org/jira/browse/HADOOP-8409?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ivan Mitic updated HADOOP-8409:
-------------------------------

    Attachment: HADOOP-8409-branch-1-win.2.patch

Attaching patch that fixes test failures in TestGenericOptionsParser and TestCommandLineJobSubmission.

As GenericOptionsParser only accepts valid URIs, and File#toString() always normalizes the path to the native OS path, we must first covert a File to an URI before we can pass it to GenericOptionsParser.

For illustration purposes, on Windows:
{code}
new File("some/path")#toString() == some\path
new File("c:/some/path")#toString() == c:\some\path
new File("/c:/some/path")#toString() == c:\some\path
{code}
                
> Address Hadoop path related issues on Windows
> ---------------------------------------------
>
>                 Key: HADOOP-8409
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8409
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs, test, util
>    Affects Versions: 1.0.0
>            Reporter: Ivan Mitic
>            Assignee: Ivan Mitic
>         Attachments: HADOOP-8409-branch-1-win.2.patch, HADOOP-8409-branch-1-win.patch
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> There are multiple places in prod and test code where Windows paths are not handled properly. From a high level this could be summarized with:
> 1. Windows paths are not necessarily valid DFS paths (while Unix paths are)
> 2. Windows paths are not necessarily valid URIs (while Unix paths are)
> #1 causes a number of tests to fail because they implicitly assume that local paths are valid DFS paths (by extracting the DFS test path from for example "test.build.data" property)
> #2 causes issues when URIs are directly created on path strings passed in by the user

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira