You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Mithun Radhakrishnan (JIRA)" <ji...@apache.org> on 2017/10/18 23:05:01 UTC

[jira] [Comment Edited] (HIVE-17802) Remove unnecessary calls to FileSystem.setOwner() from FileOutputCommitterContainer

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

Mithun Radhakrishnan edited comment on HIVE-17802 at 10/18/17 11:04 PM:
------------------------------------------------------------------------

I've uploaded the {{branch-2}} patch that's likely to break {{itests/TestExtendedAcls}}. We might have to sort out the call to {{FileSystem.setOwner()}} to modify the group, in {{FileOutputCommitterContainer::applyGroupAndPerms()}}.


was (Author: mithun):
I've uploaded the {{branch-2.2}} patch that's likely to break {{itests/TestExtendedAcls}}. We might have to sort out the call to {{FileSystem.setOwner()}} to modify the group, in {{FileOutputCommitterContainer::applyGroupAndPerms()}}.

> Remove unnecessary calls to FileSystem.setOwner() from FileOutputCommitterContainer
> -----------------------------------------------------------------------------------
>
>                 Key: HIVE-17802
>                 URL: https://issues.apache.org/jira/browse/HIVE-17802
>             Project: Hive
>          Issue Type: Bug
>          Components: HCatalog
>    Affects Versions: 2.2.0, 3.0.0
>            Reporter: Mithun Radhakrishnan
>            Assignee: Chris Drome
>         Attachments: HIVE-17802.1.patch, HIVE-17802.2-branch-2.patch, HIVE-17802.2.patch
>
>
> For large Pig/HCat queries that produce a large number of partitions/directories/files, we have seen cases where the HDFS NameNode groaned under the weight of {{FileSystem.setOwner()}} calls, originating from the commit-step. This was the result of the following code in FileOutputCommitterContainer:
> {code:java}
> private void applyGroupAndPerms(FileSystem fs, Path dir, FsPermission permission,
>                   List<AclEntry> acls, String group, boolean recursive)
>     throws IOException {
> ...
>     if (recursive) {
>       for (FileStatus fileStatus : fs.listStatus(dir)) {
>         if (fileStatus.isDir()) {
>           applyGroupAndPerms(fs, fileStatus.getPath(), permission, acls, group, true);
>         } else {
>           fs.setPermission(fileStatus.getPath(), permission);
>           chown(fs, fileStatus.getPath(), group);
>         }
>       }
>     }
>   }
>   private void chown(FileSystem fs, Path file, String group) throws IOException {
>     try {
>       fs.setOwner(file, null, group);
>     } catch (AccessControlException ignore) {
>       // Some users have wrong table group, ignore it.
>       LOG.warn("Failed to change group of partition directories/files: " + file, ignore);
>     }
>   }
> {code}
> One call per file/directory is far too many. We have a patch that reduces the namenode pressure.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)