Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-14049

Honour AclBit flag associated to file/folder permission for Azure datalake account

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0-alpha4
    • Fix Version/s: 2.8.0, 3.0.0-alpha4
    • Component/s: fs/adl
    • Labels:
      None

      Description

      ADLS persist AclBit information on a file/folder. Since Java SDK 2.1.4 - AclBit value can be retrieved using DirectoryEntry.aclBit.

      1. HADOOP-14049-01.patch
        7 kB
        Vishwajeet Dusane
      2. HADOOP-14049.02.patch
        7 kB
        Vishwajeet Dusane

        Activity

        Hide
        vishwajeet.dusane Vishwajeet Dusane added a comment -

        Consume DirectoryEntry.aclBit status to return AdlPermission.getAclBit() object returned part of getFileStatus(),lisStatus() response.

        Show
        vishwajeet.dusane Vishwajeet Dusane added a comment - Consume DirectoryEntry.aclBit status to return AdlPermission.getAclBit() object returned part of getFileStatus() , lisStatus() response.
        Hide
        hadoopqa Hadoop QA added a comment -
        +1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 14s Docker mode activated.
        +1 @author 0m 0s The patch does not contain any @author tags.
        +1 test4tests 0m 0s The patch appears to include 3 new or modified test files.
        +1 mvninstall 12m 22s trunk passed
        +1 compile 0m 14s trunk passed
        +1 checkstyle 0m 11s trunk passed
        +1 mvnsite 0m 16s trunk passed
        +1 mvneclipse 0m 12s trunk passed
        +1 findbugs 0m 21s trunk passed
        +1 javadoc 0m 12s trunk passed
        +1 mvninstall 0m 13s the patch passed
        +1 compile 0m 12s the patch passed
        +1 javac 0m 12s the patch passed
        +1 checkstyle 0m 8s the patch passed
        +1 mvnsite 0m 13s the patch passed
        +1 mvneclipse 0m 10s the patch passed
        +1 whitespace 0m 0s The patch has no whitespace issues.
        +1 findbugs 0m 27s the patch passed
        +1 javadoc 0m 9s the patch passed
        +1 unit 3m 26s hadoop-azure-datalake in the patch passed.
        +1 asflicense 0m 15s The patch does not generate ASF License warnings.
        20m 35s



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:a9ad5d6
        JIRA Issue HADOOP-14049
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12852816/HADOOP-14049-01.patch
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux 26826b73e2a6 3.13.0-106-generic #153-Ubuntu SMP Tue Dec 6 15:44:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision trunk / 859bd15
        Default Java 1.8.0_121
        findbugs v3.0.0
        Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/11629/testReport/
        modules C: hadoop-tools/hadoop-azure-datalake U: hadoop-tools/hadoop-azure-datalake
        Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/11629/console
        Powered by Apache Yetus 0.5.0-SNAPSHOT http://yetus.apache.org

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - +1 overall Vote Subsystem Runtime Comment 0 reexec 0m 14s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. +1 test4tests 0m 0s The patch appears to include 3 new or modified test files. +1 mvninstall 12m 22s trunk passed +1 compile 0m 14s trunk passed +1 checkstyle 0m 11s trunk passed +1 mvnsite 0m 16s trunk passed +1 mvneclipse 0m 12s trunk passed +1 findbugs 0m 21s trunk passed +1 javadoc 0m 12s trunk passed +1 mvninstall 0m 13s the patch passed +1 compile 0m 12s the patch passed +1 javac 0m 12s the patch passed +1 checkstyle 0m 8s the patch passed +1 mvnsite 0m 13s the patch passed +1 mvneclipse 0m 10s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 0m 27s the patch passed +1 javadoc 0m 9s the patch passed +1 unit 3m 26s hadoop-azure-datalake in the patch passed. +1 asflicense 0m 15s The patch does not generate ASF License warnings. 20m 35s Subsystem Report/Notes Docker Image:yetus/hadoop:a9ad5d6 JIRA Issue HADOOP-14049 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12852816/HADOOP-14049-01.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 26826b73e2a6 3.13.0-106-generic #153-Ubuntu SMP Tue Dec 6 15:44:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 859bd15 Default Java 1.8.0_121 findbugs v3.0.0 Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/11629/testReport/ modules C: hadoop-tools/hadoop-azure-datalake U: hadoop-tools/hadoop-azure-datalake Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/11629/console Powered by Apache Yetus 0.5.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        Hide
        liuml07 Mingliang Liu added a comment -

        Thanks for working on this. The patch LGTM overall.

        1. As to the code
          596	    boolean aclBit = entry.aclBit;
          597	    // If ADL_SUPPORT_ACL_BIT_IN_FSPERMISSION is false, do not set aclBit from ADLS backend response
          598	    if (!aclBitStatus)
          599	    {
          600	      aclBit = aclBitStatus;
          601	    }
          

          For clearer coding style how about the following:

          // set aclBit from ADLS backend response if ADL_SUPPORT_ACL_BIT_IN_FSPERMISSION is true
          final boolean aclBit = (aclBitStatus ? entry.aclBit : false);
          
        2. I know getListFileStatusJSONResponse(boolean aclBit) is following getListFileStatusJSONResponse(int dirSize) coding convention, but can we simplify the string generation? We can simple return as example:
            public static String getListFileStatusJSONResponse(boolean aclBit) {
              return "{\"FileStatuses\":{\"FileStatus\":[{\"length\":0,\"pathSuffix\":\""
                  + java.util.UUID.randomUUID()
                  + "\",\"type\":\"DIRECTORY\",\"blockSize\":0,"
                  + "\"accessTime\":1481184513488,"
                  + "\"modificationTime\":1481184513488,\"replication\":0,"
                  + "\"permission\":\"770\","
                  + "\"owner\":\"4b27fe1a-d9ab-4a04-ad7a-4bba72cd9e6c\","
                  + "\"group\":\"4b27fe1a-d9ab-4a04-ad7a-4bba72cd9e6c\",\"aclBit\":\""
                  + aclBit + "\"}]}}";
            }
          
        Show
        liuml07 Mingliang Liu added a comment - Thanks for working on this. The patch LGTM overall. As to the code 596 boolean aclBit = entry.aclBit; 597 // If ADL_SUPPORT_ACL_BIT_IN_FSPERMISSION is false , do not set aclBit from ADLS backend response 598 if (!aclBitStatus) 599 { 600 aclBit = aclBitStatus; 601 } For clearer coding style how about the following: // set aclBit from ADLS backend response if ADL_SUPPORT_ACL_BIT_IN_FSPERMISSION is true final boolean aclBit = (aclBitStatus ? entry.aclBit : false ); I know getListFileStatusJSONResponse(boolean aclBit) is following getListFileStatusJSONResponse(int dirSize) coding convention, but can we simplify the string generation? We can simple return as example: public static String getListFileStatusJSONResponse( boolean aclBit) { return "{\" FileStatuses\ ":{\" FileStatus\ ":[{\" length\ ":0,\" pathSuffix\ ":\" " + java.util.UUID.randomUUID() + "\" ,\ "type\" :\ "DIRECTORY\" ,\ "blockSize\" :0," + "\" accessTime\ ":1481184513488," + "\" modificationTime\ ":1481184513488,\" replication\ ":0," + "\" permission\ ":\" 770\ "," + "\" owner\ ":\" 4b27fe1a-d9ab-4a04-ad7a-4bba72cd9e6c\ "," + "\" group\ ":\" 4b27fe1a-d9ab-4a04-ad7a-4bba72cd9e6c\ ",\" aclBit\ ":\" " + aclBit + "\" }]}}"; }
        Hide
        vishwajeet.dusane Vishwajeet Dusane added a comment -

        Thanks Mingliang Liu for the review. I accept comment for 1. and 2., Will make the change and upload 2nd iteration.

        Show
        vishwajeet.dusane Vishwajeet Dusane added a comment - Thanks Mingliang Liu for the review. I accept comment for 1. and 2., Will make the change and upload 2nd iteration.
        Hide
        vishwajeet.dusane Vishwajeet Dusane added a comment -

        Incorporated review comments from Mingliang Liu.

        Show
        vishwajeet.dusane Vishwajeet Dusane added a comment - Incorporated review comments from Mingliang Liu .
        Hide
        hadoopqa Hadoop QA added a comment -
        +1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 20s Docker mode activated.
        +1 @author 0m 0s The patch does not contain any @author tags.
        +1 test4tests 0m 0s The patch appears to include 3 new or modified test files.
        +1 mvninstall 12m 50s trunk passed
        +1 compile 0m 15s trunk passed
        +1 checkstyle 0m 13s trunk passed
        +1 mvnsite 0m 16s trunk passed
        +1 mvneclipse 0m 19s trunk passed
        +1 findbugs 0m 21s trunk passed
        +1 javadoc 0m 12s trunk passed
        +1 mvninstall 0m 12s the patch passed
        +1 compile 0m 12s the patch passed
        +1 javac 0m 12s the patch passed
        +1 checkstyle 0m 9s the patch passed
        +1 mvnsite 0m 14s the patch passed
        +1 mvneclipse 0m 10s the patch passed
        +1 whitespace 0m 0s The patch has no whitespace issues.
        +1 findbugs 0m 26s the patch passed
        +1 javadoc 0m 9s the patch passed
        +1 unit 3m 27s hadoop-azure-datalake in the patch passed.
        +1 asflicense 0m 18s The patch does not generate ASF License warnings.
        21m 25s



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:a9ad5d6
        JIRA Issue HADOOP-14049
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12853107/HADOOP-14049.02.patch
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux 5c97ea1ed43f 3.13.0-103-generic #150-Ubuntu SMP Thu Nov 24 10:34:17 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision trunk / 5690b51
        Default Java 1.8.0_121
        findbugs v3.0.0
        Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/11646/testReport/
        modules C: hadoop-tools/hadoop-azure-datalake U: hadoop-tools/hadoop-azure-datalake
        Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/11646/console
        Powered by Apache Yetus 0.5.0-SNAPSHOT http://yetus.apache.org

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - +1 overall Vote Subsystem Runtime Comment 0 reexec 0m 20s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. +1 test4tests 0m 0s The patch appears to include 3 new or modified test files. +1 mvninstall 12m 50s trunk passed +1 compile 0m 15s trunk passed +1 checkstyle 0m 13s trunk passed +1 mvnsite 0m 16s trunk passed +1 mvneclipse 0m 19s trunk passed +1 findbugs 0m 21s trunk passed +1 javadoc 0m 12s trunk passed +1 mvninstall 0m 12s the patch passed +1 compile 0m 12s the patch passed +1 javac 0m 12s the patch passed +1 checkstyle 0m 9s the patch passed +1 mvnsite 0m 14s the patch passed +1 mvneclipse 0m 10s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 0m 26s the patch passed +1 javadoc 0m 9s the patch passed +1 unit 3m 27s hadoop-azure-datalake in the patch passed. +1 asflicense 0m 18s The patch does not generate ASF License warnings. 21m 25s Subsystem Report/Notes Docker Image:yetus/hadoop:a9ad5d6 JIRA Issue HADOOP-14049 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12853107/HADOOP-14049.02.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 5c97ea1ed43f 3.13.0-103-generic #150-Ubuntu SMP Thu Nov 24 10:34:17 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 5690b51 Default Java 1.8.0_121 findbugs v3.0.0 Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/11646/testReport/ modules C: hadoop-tools/hadoop-azure-datalake U: hadoop-tools/hadoop-azure-datalake Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/11646/console Powered by Apache Yetus 0.5.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        Hide
        liuml07 Mingliang Liu added a comment -

        +1

        Show
        liuml07 Mingliang Liu added a comment - +1
        Hide
        liuml07 Mingliang Liu added a comment -

        I have committed the patch to trunk branch. Thanks for your contribution Vishwajeet Dusane.

        Show
        liuml07 Mingliang Liu added a comment - I have committed the patch to trunk branch. Thanks for your contribution Vishwajeet Dusane .
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #11269 (See https://builds.apache.org/job/Hadoop-trunk-Commit/11269/)
        HADOOP-14049. Honour AclBit flag associated to file/folder permission (liuml07: rev f4329990250bed62efdebe3ce2bc740092cf9573)

        • (edit) hadoop-tools/hadoop-azure-datalake/src/test/java/org/apache/hadoop/fs/adl/TestListStatus.java
        • (edit) hadoop-tools/hadoop-azure-datalake/src/test/java/org/apache/hadoop/fs/adl/TestADLResponseData.java
        • (edit) hadoop-tools/hadoop-azure-datalake/src/test/java/org/apache/hadoop/fs/adl/TestGetFileStatus.java
        • (edit) hadoop-tools/hadoop-azure-datalake/src/main/java/org/apache/hadoop/fs/adl/AdlFileSystem.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #11269 (See https://builds.apache.org/job/Hadoop-trunk-Commit/11269/ ) HADOOP-14049 . Honour AclBit flag associated to file/folder permission (liuml07: rev f4329990250bed62efdebe3ce2bc740092cf9573) (edit) hadoop-tools/hadoop-azure-datalake/src/test/java/org/apache/hadoop/fs/adl/TestListStatus.java (edit) hadoop-tools/hadoop-azure-datalake/src/test/java/org/apache/hadoop/fs/adl/TestADLResponseData.java (edit) hadoop-tools/hadoop-azure-datalake/src/test/java/org/apache/hadoop/fs/adl/TestGetFileStatus.java (edit) hadoop-tools/hadoop-azure-datalake/src/main/java/org/apache/hadoop/fs/adl/AdlFileSystem.java
        Hide
        vishwajeet.dusane Vishwajeet Dusane added a comment -

        Thanks you Mingliang Liu for the review and commit.

        Show
        vishwajeet.dusane Vishwajeet Dusane added a comment - Thanks you Mingliang Liu for the review and commit.

          People

          • Assignee:
            vishwajeet.dusane Vishwajeet Dusane
            Reporter:
            vishwajeet.dusane Vishwajeet Dusane
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development