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

Luca Telloli updated HDFS-456:
------------------------------

    Attachment: HDFS-456.patch

Unit tests seem to have issues under Windows, and the issues don't seem all 
related to this patch. To prove that, I reverted HDFS-396 on a fresh trunk and 
the same tests fail in there. 

Given that, I'm attaching a patch that has some Windows specific code which 
solve some unit tests issues but not all of them. In particular, the windows 
specific code looks like:
{noformat}
          if(name.matches("^[a-zA-Z]:.*")){
                  u = new File(name).getCanonicalFile().toURI();
          } else {
                  // process value as URI 
                  u = new URI(name);
          }
{noformat}
where the condition checks for a windows filename 

The other unit test problems will be treated in HDFS-462

> Problems with dfs.name.edits.dirs as URI
> ----------------------------------------
>
>                 Key: HDFS-456
>                 URL: https://issues.apache.org/jira/browse/HDFS-456
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: name-node
>    Affects Versions: 0.21.0
>            Reporter: Konstantin Shvachko
>            Assignee: Luca Telloli
>             Fix For: 0.21.0
>
>         Attachments: HDFS-456.patch, HDFS-456.patch, HDFS-456.patch
>
>
> There are several problems with recent commit of HDFS-396.
> # It does not work with default configuration "file:///". Throws 
> {{IllegalArgumentException}}.
> # *ALL* hdfs tests fail on Windows because "C:\mypath" is treated as an 
> illegal URI. Backward compatibility is not provided.
> # {{IllegalArgumentException}} should not be thrown within hdfs code because 
> it is a {{RuntimException}}. We should throw {{IOException}} instead. This 
> was recently discussed in another jira.
> # Why do we commit patches without running unit tests and test-patch? This is 
> the minimum requirement for a patch to qualify as committable, right?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to