[ 
https://issues.apache.org/jira/browse/HIVE-23518?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Attila Magyar updated HIVE-23518:
---------------------------------
    Description: 
Before updating file permissions TEZ check if the permission change is needed 
with the following conditional:
{code:java}
if 
(!SPILL_FILE_PERMS.equals(SPILL_FILE_PERMS.applyUMask(FsPermission.getUMask(conf))))
 {
  rfs.setPermission(filename, SPILL_FILE_PERMS);
} {code}
If the config object is changing in the background then setPermission() call 
will be skipped.

The rfs file system is always a local file system so there is no need to do 
this check beforehand (it doesn't generate an additional NameNode call).
{code:java}
rfs = ((LocalFileSystem)FileSystem.getLocal(this.conf)).getRaw(); {code}
 We can remove the if statement and do the permission change unconditionally.

  was:
Before updating file permissions TEZ check if the permission change is needed 
with the following conditional:
{code:java}
if 
(!SPILL_FILE_PERMS.equals(SPILL_FILE_PERMS.applyUMask(FsPermission.getUMask(conf))))
 {
  rfs.setPermission(filename, SPILL_FILE_PERMS);
} {code}
If the config object is changing in the background then setPermission() call 
will be skipped.

The rfs file system is always a local file system so there is no need to do 
this check beforehand (it doesn't generate an additional NameNode call).
{code:java}
rfs = ((LocalFileSystem)FileSystem.getLocal(this.conf)).getRaw(); {code}
 


> Tez may skip file permission update on intermediate output
> ----------------------------------------------------------
>
>                 Key: HIVE-23518
>                 URL: https://issues.apache.org/jira/browse/HIVE-23518
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Attila Magyar
>            Assignee: Attila Magyar
>            Priority: Major
>
> Before updating file permissions TEZ check if the permission change is needed 
> with the following conditional:
> {code:java}
> if 
> (!SPILL_FILE_PERMS.equals(SPILL_FILE_PERMS.applyUMask(FsPermission.getUMask(conf))))
>  {
>   rfs.setPermission(filename, SPILL_FILE_PERMS);
> } {code}
> If the config object is changing in the background then setPermission() call 
> will be skipped.
> The rfs file system is always a local file system so there is no need to do 
> this check beforehand (it doesn't generate an additional NameNode call).
> {code:java}
> rfs = ((LocalFileSystem)FileSystem.getLocal(this.conf)).getRaw(); {code}
>  We can remove the if statement and do the permission change unconditionally.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to