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

Konstantin Shvachko commented on HADOOP-7110:
---------------------------------------------

Thanks for explanation, Todd. I understand now. As I see it the problem you 
observed in MAPREDUCE-2238 is caused by that {{Localizer.PermissionsHandler}} 
first clears the permissions by setting them to 000, then setting the ones 
passed. So if it fails right after setting them to 000 it will be hard to 
remove such file or directory.
So why don't we just set permissions to the values specified (in the right 
order, which is probably important) rather than introducing more JNI code. 
Nobody said we should support posix permissions.
Your patch is an alternative implementation of HADOOP-6304. You should have 
attached it to that jira rather than creating the new one. Now the discussion 
is split into parts, making it hard to follow.

> Implement chmod with JNI
> ------------------------
>
>                 Key: HADOOP-7110
>                 URL: https://issues.apache.org/jira/browse/HADOOP-7110
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: io, native
>    Affects Versions: 0.22.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>             Fix For: 0.22.0
>
>         Attachments: hadoop-7110.txt
>
>
> MapReduce is currently using a race-prone workaround to approximate chmod() 
> because forking chmod is too expensive. This race is causing build failures 
> (and probably task failures too). We should implement chmod in the NativeIO 
> library so we can have good performance (ie not fork) and still not be prone 
> to races.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to