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

Code cleanup -- ViewFileSystem and InodeTree

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.0-alpha2
    • Fix Version/s: 3.0.0-alpha2
    • Component/s: viewfs
    • Labels:
      None

      Description

      ViewFileSystem is the FileSystem for viewfs:// and its uses InodeTree to manage the mount points. These files being very old, don't quit adhere to the styling and coding standards. Will do code cleanup of these files as part of this jira. No new functionalities or tests will be added as part of this jira.

      1. HADOOP-13722.01.patch
        22 kB
        Manoj Govindassamy
      2. HADOOP-13722.02.patch
        31 kB
        Manoj Govindassamy

        Activity

        Hide
        manojg Manoj Govindassamy added a comment -

        Attaching v01 patch to address various code cleanliness issues in ViewFileSystem and InodeTree

        Show
        manojg Manoj Govindassamy added a comment - Attaching v01 patch to address various code cleanliness issues in ViewFileSystem and InodeTree
        Hide
        manojg Manoj Govindassamy added a comment -

        Andrew Wang, please take a look at the patch whenever you find time.

        Show
        manojg Manoj Govindassamy added a comment - Andrew Wang , please take a look at the patch whenever you find time.
        Hide
        hadoopqa Hadoop QA added a comment -
        +1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 18s Docker mode activated.
        +1 @author 0m 0s The patch does not contain any @author tags.
        +1 test4tests 0m 0s The patch appears to include 1 new or modified test files.
        +1 mvninstall 7m 47s trunk passed
        +1 compile 8m 21s trunk passed
        +1 checkstyle 0m 26s trunk passed
        +1 mvnsite 1m 12s trunk passed
        +1 mvneclipse 0m 15s trunk passed
        +1 findbugs 1m 32s trunk passed
        +1 javadoc 0m 45s trunk passed
        +1 mvninstall 0m 39s the patch passed
        +1 compile 8m 9s the patch passed
        +1 javac 8m 9s the patch passed
        +1 checkstyle 0m 30s hadoop-common-project/hadoop-common: The patch generated 0 new + 80 unchanged - 22 fixed = 80 total (was 102)
        +1 mvnsite 1m 8s the patch passed
        +1 mvneclipse 0m 15s the patch passed
        +1 whitespace 0m 0s The patch has no whitespace issues.
        +1 findbugs 1m 56s the patch passed
        +1 javadoc 0m 44s the patch passed
        +1 unit 9m 15s hadoop-common in the patch passed.
        +1 asflicense 0m 26s The patch does not generate ASF License warnings.
        45m 6s



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:9560f25
        JIRA Issue HADOOP-13722
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12833473/HADOOP-13722.01.patch
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux c98f5df27f75 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision trunk / 76cc84e
        Default Java 1.8.0_101
        findbugs v3.0.0
        Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/10799/testReport/
        modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common
        Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/10799/console
        Powered by Apache Yetus 0.4.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 18s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. +1 test4tests 0m 0s The patch appears to include 1 new or modified test files. +1 mvninstall 7m 47s trunk passed +1 compile 8m 21s trunk passed +1 checkstyle 0m 26s trunk passed +1 mvnsite 1m 12s trunk passed +1 mvneclipse 0m 15s trunk passed +1 findbugs 1m 32s trunk passed +1 javadoc 0m 45s trunk passed +1 mvninstall 0m 39s the patch passed +1 compile 8m 9s the patch passed +1 javac 8m 9s the patch passed +1 checkstyle 0m 30s hadoop-common-project/hadoop-common: The patch generated 0 new + 80 unchanged - 22 fixed = 80 total (was 102) +1 mvnsite 1m 8s the patch passed +1 mvneclipse 0m 15s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 56s the patch passed +1 javadoc 0m 44s the patch passed +1 unit 9m 15s hadoop-common in the patch passed. +1 asflicense 0m 26s The patch does not generate ASF License warnings. 45m 6s Subsystem Report/Notes Docker Image:yetus/hadoop:9560f25 JIRA Issue HADOOP-13722 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12833473/HADOOP-13722.01.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux c98f5df27f75 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 76cc84e Default Java 1.8.0_101 findbugs v3.0.0 Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/10799/testReport/ modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/10799/console Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        Hide
        andrew.wang Andrew Wang added a comment -

        I bet precommit bot is going to have a field day with the VFS code you can tell it predates checkstyle turned on in precommit.

        I see a few other small nits we could address:

        • Unnecessary "static" on ResultKind, I think we should also have a newline after the closing brace of this enum.
        • Erratic indentation still on the getTargetFileSystem overrides
        • TestViewFsConfig, indentation of the "new InodeTree" is off, maybe run the auto-formatter on this entire file.
        • ViewFileSystem#MountPoint, want to turn those slash comments into javadoc comments?
        Show
        andrew.wang Andrew Wang added a comment - I bet precommit bot is going to have a field day with the VFS code you can tell it predates checkstyle turned on in precommit. I see a few other small nits we could address: Unnecessary "static" on ResultKind, I think we should also have a newline after the closing brace of this enum. Erratic indentation still on the getTargetFileSystem overrides TestViewFsConfig, indentation of the "new InodeTree" is off, maybe run the auto-formatter on this entire file. ViewFileSystem#MountPoint, want to turn those slash comments into javadoc comments?
        Hide
        manojg Manoj Govindassamy added a comment -

        Thanks for the review Andrew Wang.

        1. Removed static from ResultKind. Added an extra newline after this enum.
        2. Indentation for getTargetFileSystem() overrides are fixed
        3. TestViewFsCondfig and InodeTree is auto formatted now.
        4. Added javadoc style comments to ViewFileSystem#MountPoint.

        Show
        manojg Manoj Govindassamy added a comment - Thanks for the review Andrew Wang . 1. Removed static from ResultKind. Added an extra newline after this enum. 2. Indentation for getTargetFileSystem() overrides are fixed 3. TestViewFsCondfig and InodeTree is auto formatted now. 4. Added javadoc style comments to ViewFileSystem#MountPoint.
        Hide
        manojg Manoj Govindassamy added a comment -

        Attaching v02 patch with previous review comments addressed.

        Show
        manojg Manoj Govindassamy added a comment - Attaching v02 patch with previous review comments addressed.
        Hide
        hadoopqa Hadoop QA added a comment -
        +1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 19s Docker mode activated.
        +1 @author 0m 0s The patch does not contain any @author tags.
        +1 test4tests 0m 0s The patch appears to include 1 new or modified test files.
        +1 mvninstall 7m 52s trunk passed
        +1 compile 7m 18s trunk passed
        +1 checkstyle 0m 24s trunk passed
        +1 mvnsite 0m 56s trunk passed
        +1 mvneclipse 0m 13s trunk passed
        +1 findbugs 1m 20s trunk passed
        +1 javadoc 0m 43s trunk passed
        +1 mvninstall 0m 35s the patch passed
        +1 compile 7m 19s the patch passed
        +1 javac 7m 19s the patch passed
        +1 checkstyle 0m 26s hadoop-common-project/hadoop-common: The patch generated 0 new + 73 unchanged - 29 fixed = 73 total (was 102)
        +1 mvnsite 1m 0s the patch passed
        +1 mvneclipse 0m 13s the patch passed
        +1 whitespace 0m 0s The patch has no whitespace issues.
        +1 findbugs 1m 30s the patch passed
        +1 javadoc 0m 43s the patch passed
        +1 unit 8m 54s hadoop-common in the patch passed.
        +1 asflicense 0m 23s The patch does not generate ASF License warnings.
        41m 33s



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:9560f25
        JIRA Issue HADOOP-13722
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12833784/HADOOP-13722.02.patch
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux a35e2f7c14c6 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision trunk / ed9fcbe
        Default Java 1.8.0_101
        findbugs v3.0.0
        Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/10812/testReport/
        modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common
        Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/10812/console
        Powered by Apache Yetus 0.4.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 19s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. +1 test4tests 0m 0s The patch appears to include 1 new or modified test files. +1 mvninstall 7m 52s trunk passed +1 compile 7m 18s trunk passed +1 checkstyle 0m 24s trunk passed +1 mvnsite 0m 56s trunk passed +1 mvneclipse 0m 13s trunk passed +1 findbugs 1m 20s trunk passed +1 javadoc 0m 43s trunk passed +1 mvninstall 0m 35s the patch passed +1 compile 7m 19s the patch passed +1 javac 7m 19s the patch passed +1 checkstyle 0m 26s hadoop-common-project/hadoop-common: The patch generated 0 new + 73 unchanged - 29 fixed = 73 total (was 102) +1 mvnsite 1m 0s the patch passed +1 mvneclipse 0m 13s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 30s the patch passed +1 javadoc 0m 43s the patch passed +1 unit 8m 54s hadoop-common in the patch passed. +1 asflicense 0m 23s The patch does not generate ASF License warnings. 41m 33s Subsystem Report/Notes Docker Image:yetus/hadoop:9560f25 JIRA Issue HADOOP-13722 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12833784/HADOOP-13722.02.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux a35e2f7c14c6 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / ed9fcbe Default Java 1.8.0_101 findbugs v3.0.0 Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/10812/testReport/ modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/10812/console Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        Hide
        andrew.wang Andrew Wang added a comment -

        +1 will commit shortly

        Show
        andrew.wang Andrew Wang added a comment - +1 will commit shortly
        Hide
        andrew.wang Andrew Wang added a comment -

        Committed to trunk, thanks Manoj for working on this!

        Show
        andrew.wang Andrew Wang added a comment - Committed to trunk, thanks Manoj for working on this!
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #10626 (See https://builds.apache.org/job/Hadoop-trunk-Commit/10626/)
        HADOOP-13722. Code cleanup – ViewFileSystem and InodeTree. Contributed (wang: rev 0f4afc81009129bbee89d5b6cf22c8dda612d223)

        • (edit) hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFsConfig.java
        • (edit) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/InodeTree.java
        • (edit) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFileSystem.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #10626 (See https://builds.apache.org/job/Hadoop-trunk-Commit/10626/ ) HADOOP-13722 . Code cleanup – ViewFileSystem and InodeTree. Contributed (wang: rev 0f4afc81009129bbee89d5b6cf22c8dda612d223) (edit) hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFsConfig.java (edit) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/InodeTree.java (edit) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFileSystem.java

          People

          • Assignee:
            manojg Manoj Govindassamy
            Reporter:
            manojg Manoj Govindassamy
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development