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

Bikas Saha commented on HADOOP-8973:
------------------------------------

I dont have a preference either way on how this we perform the check. What I 
dont want is to see 2 code paths do different things for what should 
essentially be the same operation. It is confusing, inconsistent and not good 
to maintain. So please make both versions of checkDirs consistent, ideally 
without code duplication.

Now the question of how the check is done. It seems to me that what 
checkDir(FS, Path, Perm) is doing is sufficient for our use cases. The code to 
check permissions via the "implies" functions are used in a number of places in 
the code. What I am trying to understand is why the check is sufficient/correct 
for all those cases and not here. If there is an issue in that logic then we 
have issues in a number of critical places in the code which should be fixed. 
Its more than a question of cross-platform compatibility. If there is no issue 
that logic then its not clear why we need to do something different for this 
particular case. Does this make my questions clear?

We need to be careful about the performance impact of how the check is done. I 
see a number of places that call checkDirs() method for a collection of 
directories. Do we want to write to a temp file for all those cases in order to 
check for writability?
                
> 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: trunk-win
>            Reporter: Chris Nauroth
>            Assignee: Chris Nauroth
>         Attachments: 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

Reply via email to