[
https://issues.apache.org/jira/browse/HDFS-4818?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chris Nauroth updated HDFS-4818:
--------------------------------
Attachment: HDFS-4818.1.patch
This patch fixes the problems by setting more restrictive permissions. This
works for both Linux and Windows, so no special-casing for Windows is required.
While working on this, I also found a few other small platform-specific issues
that I rolled into this patch:
{{NNStorage}} - Switched to using platform-specific file separator. This had
been causing a test failure in {{TestFileJournalManager}}.
{{TestCheckpoint}} - On Windows, we cannot read the lock file, so the log
message won't contain the JVM name. (See HDFS-4572.)
{{TestFileJournalManager}} - Reordered some statements so that the directory is
restored to writable state first before checking the assertion. This way, even
if the assertion fails, the directory's permissions get restored to the correct
state. Also cleaned up some file handle leaks.
{{TestFsck}} - Switched to using platform-specific line ending to assert on
fsck output.
I validated this patch by running the following tests successfully on Mac and
Windows: {{TestCheckpoint}}, {{TestEditLog}}, {{TestFileJournalManager}},
{{TestNNStorageRetentionFunctional}}, {{TestNameNodeMXBean}}, {{TestFsck}}.
> several HDFS tests that attempt to make directories unusable do not work
> correctly on Windows
> ---------------------------------------------------------------------------------------------
>
> Key: HDFS-4818
> URL: https://issues.apache.org/jira/browse/HDFS-4818
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: namenode, test
> Affects Versions: 3.0.0
> Reporter: Chris Nauroth
> Assignee: Chris Nauroth
> Attachments: HDFS-4818.1.patch
>
>
> Several tests set restrictive permissions on the name directories to simulate
> disk failure and verify that the namenode can still function with one of
> multiple name directories out of service. These permissions do not restrict
> access as expected on Windows.
--
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