hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Nauroth (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-8973) DiskChecker cannot reliably detect an inaccessible disk on Windows with NTFS ACLs
Date Fri, 08 Mar 2013 17:56:13 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-8973?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13597336#comment-13597336

Chris Nauroth commented on HADOOP-8973:

If java 7 File.canWrite etc are going to work on Windows (like mentioned in some comments
above) then we could enable the API path when (!Windows or Java>6).

Sorry, let me clarify the Java 7 situation.  Java 7 does not fix the bugs in java.io.File
canRead/canWrite/canExecute.  Instead, it adds new methods that are very similar in {{java.nio.file.Files}},
and these new methods are the ones that correctly handle ACLs:


I'm not sure why they didn't just fix the bugs in {{java.io.File}}, but that's the way it
is.  This means that it wouldn't be correct to do if (JDK7) then use File methods.  We have
to wait for Hadoop as a whole go to JDK7 (for compile time, not just runtime) and migrate
the {{DiskChecker}} code to use the new APIs.  Unfortunately, we can't do anything right now
in this patch to prepare for that.

The old Sun bug report has some relevant discussion:


Please do open a jira to fix this issue in branch-1-win too.

Actually, I was planning on doing this in scope of the current jira.  I just wanted to get
buy-in on the trunk patch first.  I expect to have the branch-1 patch ready later today.

> DiskChecker cannot reliably detect an inaccessible disk on Windows with NTFS ACLs
> ---------------------------------------------------------------------------------
>                 Key: HADOOP-8973
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8973
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: util
>    Affects Versions: 3.0.0
>            Reporter: Chris Nauroth
>            Assignee: Chris Nauroth
>         Attachments: HADOOP-8973.3.patch, HADOOP-8973-branch-trunk-win.2.patch, HADOOP-8973-branch-trunk-win.patch
> DiskChecker.checkDir uses File.canRead, File.canWrite, and File.canExecute to check if
a directory is inaccessible.  These APIs are not reliable on Windows with NTFS ACLs due to
a known JVM bug.

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

View raw message