hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mithun Radhakrishnan (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-17802) Remove unnecessary calls to FileSystem.setOwner() from FileOutputCommitterContainer
Date Mon, 16 Oct 2017 21:33:00 GMT

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

Mithun Radhakrishnan updated HIVE-17802:
----------------------------------------
    Attachment: HIVE-17802.1.patch

Cumulative patch with HIVE-17802, HIVE-17803, and part of HIVE-13989.

> 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
>
>
> 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)

Mime
View raw message