Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-15385

Failure to inherit permissions when running HdfsUtils.setFullFileStatus(..., false) causes queries to fail

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.3.0
    • Component/s: Hive
    • Labels:
      None

      Description

      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.

        Attachments

        1. HIVE-15385.1.patch
          11 kB
          Sahil Takiar
        2. HIVE-15385.2.patch
          22 kB
          Sahil Takiar

          Issue Links

            Activity

              People

              • Assignee:
                stakiar Sahil Takiar
                Reporter:
                stakiar Sahil Takiar
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: