hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivan Mitic (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HDFS-4604) TestJournalNode fails on Windows
Date Fri, 15 Mar 2013 08:08:13 GMT

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

Ivan Mitic updated HDFS-4604:
-----------------------------

    Attachment: HDFS-4604.patch

Test fails on Windows because it assumes certain unix local paths (like {{/dev/null}} and
{{/proc/does-not-exist}}).

While working on the fix I noticed that logic under JournalNode#validateAndCreateJournalDir
uses java.io.File#canWrite() which does not work as expected on Windows. To address that I
replaced the majority of the logic under validateAndCreateJournalDir by calling into DiskChecker#checkDir.
I think this gets us the behavior we want here. Please comment if this sounds good.

Just to add, there is one incremental improvement we can do in the patch. Currently, the patch
assumes certain exception strings back from the DiskChecker. If someone changes those strings,
it can break HDFS test patch by accident. 
                
> TestJournalNode fails on Windows
> --------------------------------
>
>                 Key: HDFS-4604
>                 URL: https://issues.apache.org/jira/browse/HDFS-4604
>             Project: Hadoop HDFS
>          Issue Type: Bug
>    Affects Versions: 3.0.0
>            Reporter: Ivan Mitic
>            Assignee: Ivan Mitic
>         Attachments: HDFS-4604.patch
>
>
> The test fails with the below assertion:
> {code}
> testFailToStartWithBadConfig(org.apache.hadoop.hdfs.qjournal.server.TestJournalNode)
 Time elapsed: 209 sec  <<< FAILURE!
> java.lang.AssertionError: Expected to find 'is not a directory' but got unexpected exception:java.lang.IllegalArgumentException:
Journal dir '\dev\null' should be an absolute path
> 	at org.apache.hadoop.hdfs.qjournal.server.JournalNode.validateAndCreateJournalDir(JournalNode.java:96)
> 	at org.apache.hadoop.hdfs.qjournal.server.JournalNode.start(JournalNode.java:132)
> 	at org.apache.hadoop.hdfs.qjournal.server.TestJournalNode.assertJNFailsToStart(TestJournalNode.java:294)
> 	at org.apache.hadoop.hdfs.qjournal.server.TestJournalNode.testFailToStartWithBadConfig(TestJournalNode.java:281)
> {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

Mime
View raw message