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

ASF subversion and git services commented on NIFI-5575:
-------------------------------------------------------

Commit 7a763d3c496049725524a0022e86775b3d0fd760 in nifi's branch 
refs/heads/master from Key Miyauchi
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=7a763d3 ]

NIFI-5575 Make PutHDFS check fs.permissions.umask-mode if property "Permission 
umask" is empty.


> PutHDFS does not use fs.permissions.umask-mode from hdfs-site.xml
> -----------------------------------------------------------------
>
>                 Key: NIFI-5575
>                 URL: https://issues.apache.org/jira/browse/NIFI-5575
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Extensions
>    Affects Versions: 1.8.0, 1.7.1
>            Reporter: Jeff Storck
>            Assignee: Kei Miyauchi
>            Priority: Major
>             Fix For: 1.9.0
>
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> PutHDFS does not use the value of "fs.permissions.umask-mode" in 
> hdfs-site.xml.  If the user does not provide a umask in the "Permissions 
> umask" property, PutHDFS will use FsPermissions.DEFAULT_UMASK and set that in 
> the config, which will overwrite the value from hdfs-site.xml.
> The code below shows that without the "Permissions umask" property being set, 
> it will force a umask of '18', the value of FsPermission.DEFAULT_MASK.
> Instead, PutHDFS should first check the Configuration instance to see if 
> "fs.permissions.umask-mode" is set and use that value.  
> FsPermission.DEFAULT_MASK should be used only in the case when 
> "fs.permissions.umask-mode" is not set.
> {code:java}
>     protected void preProcessConfiguration(final Configuration config, final 
> ProcessContext context) {
>         // Set umask once, to avoid thread safety issues doing it in onTrigger
>         final PropertyValue umaskProp = context.getProperty(UMASK);
>         final short dfsUmask;
>         if (umaskProp.isSet()) {
>             dfsUmask = Short.parseShort(umaskProp.getValue(), 8);
>         } else {
>             dfsUmask = FsPermission.DEFAULT_UMASK;
>         }
>         FsPermission.setUMask(config, new FsPermission(dfsUmask));
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to