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

Chris Nauroth commented on HDFS-4705:
-------------------------------------

Ivan, you read my mind!  :-)  I was just about to comment stating that all of 
my attempts to fix it outside the tests turned out to be infeasible and that I 
was going to switch back to fixing it by setting dfs.namenode.name.dir in each 
test.

Just for the record, here is what I tried, and why it won't work:

# Fixing it in the HDFS {{Util}} class is too late.  The directory already has 
a mix of '/' and '\', and we can't reliably correct it.  Even passing through 
{{Path}}, it would interpret everything up to the first '/' as authority, which 
wouldn't be correct.
# Fixing it in {{Configuration}} is very brittle when you consider things like 
comma-separated lists.  I'm also wary of destabilizing the logic in here for 
all Hadoop projects, because it's supposed to be a public/stable interface.
# I also tried some Maven trickery to replace all '\' with '/' in the pom.xml.  
However, we still end up with the effect of concatenating 2 absolute paths 
(including drive specs), so that's not right.

Thanks for finishing out the test fixes!  I expect I'll have time to review the 
patch later tonight.

                
> Address HDFS test failures on Windows because of invalid dfs.namenode.name.dir
> ------------------------------------------------------------------------------
>
>                 Key: HDFS-4705
>                 URL: https://issues.apache.org/jira/browse/HDFS-4705
>             Project: Hadoop HDFS
>          Issue Type: Bug
>    Affects Versions: 3.0.0
>            Reporter: Ivan Mitic
>            Assignee: Ivan Mitic
>            Priority: Minor
>         Attachments: HDFS-4705.1.patch, HDFS-4705.2.patch
>
>
> Test fails on Windows with the below exception:
> {code}
> testFormatShouldBeIgnoredForNonFileBasedDirs(org.apache.hadoop.hdfs.server.namenode.TestAllowFormat)
>   Time elapsed: 49 sec  <<< ERROR!
> java.io.IOException: No image directories available!
>       at 
> org.apache.hadoop.hdfs.server.namenode.FSImage.saveFSImageInAllDirs(FSImage.java:912)
>       at 
> org.apache.hadoop.hdfs.server.namenode.FSImage.saveFSImageInAllDirs(FSImage.java:905)
>       at 
> org.apache.hadoop.hdfs.server.namenode.FSImage.format(FSImage.java:151)
>       at 
> org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:758)
>       at 
> org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:259)
>       at 
> org.apache.hadoop.hdfs.server.namenode.TestAllowFormat.testFormatShouldBeIgnoredForNonFileBasedDirs(TestAllowFormat.java:181)
> {code}

--
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

Reply via email to