You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Sahil Takiar (JIRA)" <ji...@apache.org> on 2016/12/08 07:59:58 UTC
[jira] [Updated] (HIVE-15385) Failure to inherit permissions when
running HdfsUtils.setFullFileStatus(..., false) causes queries to fail
[ https://issues.apache.org/jira/browse/HIVE-15385?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sahil Takiar updated HIVE-15385:
--------------------------------
Attachment: HIVE-15385.1.patch
Attaching pre-lim patch that changes the behavior of {{setFullFileStatus}} so it simply logs exceptions instead of throwing them. This is more consistent with the original behavior, and prevents introducing a backwards incompatible change to Hive.
The patch is still a WIP, but contains the major changes. If this approach looks good, there are some more tests I plan to add, some more documentation, and some a little more refactoring.
In the future, maybe we can have a config that controls if failure to inherit permissions should cause queries to fail.
> Failure to inherit permissions when running HdfsUtils.setFullFileStatus(..., false) causes queries to fail
> ----------------------------------------------------------------------------------------------------------
>
> Key: HIVE-15385
> URL: https://issues.apache.org/jira/browse/HIVE-15385
> Project: Hive
> Issue Type: Bug
> Components: Hive
> Reporter: Sahil Takiar
> Assignee: Sahil Takiar
> Attachments: HIVE-15385.1.patch
>
>
> According to https://cwiki.apache.org/confluence/display/Hive/Permission+Inheritance+in+Hive, failure to inherit permissions should not cause queries to fail.
> It looks like this was the case until HIVE-13716, which added some code to use {{fs.setOwner}}, {{fs.setAcl}}, and {{fs.setPermission}} to set permissions instead of shelling out and running {{-chgrp -R ...}}.
> When shelling out, the return status of each command is ignored, so if there are any failures when inheriting permissions, a warning is logged, but the query still succeeds.
> However, when invoked the {{FileSystem}} API, any failures will be propagated up to the caller, and the query will fail.
> This is problematic because {{setFulFileStatus}} shells out when the {{recursive}} parameter is set to {{true}}, and when it is false it invokes the {{FileSystem}} API. So the behavior is inconsistent depending on the value of {{recursive}}.
> We should decide whether or not permission inheritance should fail queries or not, and then ensure the code consistently follows that decision.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)