Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-10832

Propagate ACL bit and isEncrypted bit in HttpFS FileStatus permissions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 2.6.4
    • 2.8.0, 3.0.0-alpha2
    • httpfs
    • None

    Description

      HDFS-6326 introduced an ephemeral ACL bit in FSPermission to avoid doing extra getAclStatus calls during listStatus.

      Parsing this extra bit was not carried over to HttpFS. Currently, it tries to detect ACLs being disabled by catching exceptions (somewhat brittle). When ACLs are on, it will do a getAclStatus per FileStatus object. This could have severe performance implications.

      Snippet from FSOperations:

            /*
             * For each FileStatus, attempt to acquire an AclStatus.  If the
             * getAclStatus throws an exception, we assume that ACLs are turned
             * off entirely and abandon the attempt.
             */
            boolean useAcls = true;   // Assume ACLs work until proven otherwise
            for (int i = 0; i < fileStatuses.length; i++) {
              if (useAcls) {
                try {
                  aclStatus = fs.getAclStatus(fileStatuses[i].getPath());
                } catch (AclException e) {
                  /* Almost certainly due to an "ACLs not enabled" exception */
                  aclStatus = null;
                  useAcls = false;
                } catch (UnsupportedOperationException e) {
                  /* Ditto above - this is the case for a local file system */
                  aclStatus = null;
                  useAcls = false;
                }
              }
              statusPairs[i] = new StatusPair(fileStatuses[i], aclStatus);
      

      Attachments

        1. HDFS-10832.003.patch
          36 kB
          Andrew Wang
        2. HDFS-10832.002.patch
          34 kB
          Andrew Wang
        3. HDFS-10823.001.patch
          25 kB
          Andrew Wang

        Issue Links

          Activity

            People

              andrew.wang Andrew Wang
              andrew.wang Andrew Wang
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: