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

Jason Lowe commented on HADOOP-10945:
-------------------------------------

The umask is taking an octal number, and IMHO it should accept any legal octal 
number that fits in the expected range of values.  I do not understand at all 
why the parsing code isn't just calling Integer.parseInt to parse the octal 
number and extract each three-bit value from that.  The regexp seems like a 
very heavy-handed and error-prone way to do it, but I don't know if we need to 
rewrite the parsing from the ground up just to fix this particular error.

Patch looks OK overall.  Could you add some tests for invalid permissions as 
well?  e.g.: 1222 and 01222 are not supposed to be valid.

> 4-digit octal umask permissions throws a parse error
> ----------------------------------------------------
>
>                 Key: HADOOP-10945
>                 URL: https://issues.apache.org/jira/browse/HADOOP-10945
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 2.2.0
>            Reporter: Jason Lowe
>            Assignee: Chang Li
>         Attachments: HADOOP-10945.2.patch, HADOOP-10945.patch
>
>
> Providing a 4-digit octal number for fs permissions leads to a parse error, 
> e.g.: -Dfs.permissions.umask-mode=0022



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to