Details

    • Type: Bug
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8.0, 3.0.0-alpha2
    • Component/s: None
    • Labels:
    • Hadoop Flags:
      Reviewed

      Description

      I am conducting research on log related bugs. I tried to make a tool to fix repetitive yet simple patterns of bugs that are related to logs. Typos in log messages are one of the reoccurring bugs. Therefore, I made a tool find typos in log statements. During my experiments, I managed to find the following typos in Hadoop HDFS:

      In file /hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsVolumeList.java, FsDatasetImpl.LOG.info("The volume " + v + " is closed while " +"addng replicas ignored."),
      addng should be adding

      In file /hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java, NameNode.LOG.info("Caching file names occuring more than " + threshold+ " times"),
      occuring should be occurring

      In file /hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NNStorage.java, LOG.info("NNStorage.attemptRestoreRemovedStorage: check removed(failed) "+"storarge. removedStorages size = " + removedStorageDirs.size()),
      storarge should be storage

      In file /hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/RpcProgramNfs3.java, LOG.info("Partical read. Asked offset: " + offset + " count: " + count+ " and read back: " + readCount + " file size: "+ attrs.getSize()),
      Partical should be Partial

        Activity

        Hide
        busbey Sean Busbey added a comment -

        good finds! interested in coming up with a patch for fixing these? Our contributor guide covers everything needed to work across the code base, but I'd imagine for these things a simple manual test of compilation before and after the changes should suffice.

        Show
        busbey Sean Busbey added a comment - good finds! interested in coming up with a patch for fixing these? Our contributor guide covers everything needed to work across the code base, but I'd imagine for these things a simple manual test of compilation before and after the changes should suffice.
        Hide
        linyiqun Yiqun Lin added a comment -

        Hi, Mehran Hassani, thanks for finding so many typos. Are you ready to work for this now? If not, I'd like to make a quick fix. Let me know you thought, thanks.

        Show
        linyiqun Yiqun Lin added a comment - Hi, Mehran Hassani , thanks for finding so many typos. Are you ready to work for this now? If not, I'd like to make a quick fix. Let me know you thought, thanks.
        Hide
        MehranHassani Mehran Hassani added a comment -

        Hi, So I am actually working on them. It should be a simple fix. If I had any problem with building and compiling hadoop or other things I will let you know.

        Show
        MehranHassani Mehran Hassani added a comment - Hi, So I am actually working on them. It should be a simple fix. If I had any problem with building and compiling hadoop or other things I will let you know.
        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 doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
        0 mvndep 0m 27s Maven dependency ordering for branch
        +1 mvninstall 7m 9s trunk passed
        +1 compile 1m 24s trunk passed
        +1 checkstyle 0m 29s trunk passed
        +1 mvnsite 1m 12s trunk passed
        +1 mvneclipse 0m 24s trunk passed
        +1 findbugs 2m 17s trunk passed
        +1 javadoc 1m 11s trunk passed
        0 mvndep 0m 7s Maven dependency ordering for patch
        +1 mvninstall 1m 15s the patch passed
        +1 compile 1m 39s the patch passed
        +1 javac 1m 39s the patch passed
        +1 checkstyle 0m 32s the patch passed
        +1 mvnsite 1m 15s the patch passed
        +1 mvneclipse 0m 21s the patch passed
        +1 whitespace 0m 0s The patch has no whitespace issues.
        +1 findbugs 2m 45s the patch passed
        +1 javadoc 1m 11s the patch passed
        -1 unit 76m 33s hadoop-hdfs in the patch failed.
        +1 unit 1m 50s hadoop-hdfs-nfs in the patch passed.
        +1 asflicense 0m 22s The patch does not generate ASF License warnings.
        104m 14s



        Reason Tests
        Failed junit tests hadoop.hdfs.server.blockmanagement.TestPendingInvalidateBlock
          hadoop.hdfs.server.namenode.TestDecommissioningStatus



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:9560f25
        JIRA Issue HDFS-10862
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12828780/HDFS-10862.001.patch
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux 507949728ea2 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 / ec3ea18
        Default Java 1.8.0_101
        findbugs v3.0.0
        unit https://builds.apache.org/job/PreCommit-HDFS-Build/16765/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
        Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/16765/testReport/
        modules C: hadoop-hdfs-project/hadoop-hdfs hadoop-hdfs-project/hadoop-hdfs-nfs U: hadoop-hdfs-project
        Console output https://builds.apache.org/job/PreCommit-HDFS-Build/16765/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 doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. 0 mvndep 0m 27s Maven dependency ordering for branch +1 mvninstall 7m 9s trunk passed +1 compile 1m 24s trunk passed +1 checkstyle 0m 29s trunk passed +1 mvnsite 1m 12s trunk passed +1 mvneclipse 0m 24s trunk passed +1 findbugs 2m 17s trunk passed +1 javadoc 1m 11s trunk passed 0 mvndep 0m 7s Maven dependency ordering for patch +1 mvninstall 1m 15s the patch passed +1 compile 1m 39s the patch passed +1 javac 1m 39s the patch passed +1 checkstyle 0m 32s the patch passed +1 mvnsite 1m 15s the patch passed +1 mvneclipse 0m 21s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 2m 45s the patch passed +1 javadoc 1m 11s the patch passed -1 unit 76m 33s hadoop-hdfs in the patch failed. +1 unit 1m 50s hadoop-hdfs-nfs in the patch passed. +1 asflicense 0m 22s The patch does not generate ASF License warnings. 104m 14s Reason Tests Failed junit tests hadoop.hdfs.server.blockmanagement.TestPendingInvalidateBlock   hadoop.hdfs.server.namenode.TestDecommissioningStatus Subsystem Report/Notes Docker Image:yetus/hadoop:9560f25 JIRA Issue HDFS-10862 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12828780/HDFS-10862.001.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 507949728ea2 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 / ec3ea18 Default Java 1.8.0_101 findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-HDFS-Build/16765/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/16765/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs hadoop-hdfs-project/hadoop-hdfs-nfs U: hadoop-hdfs-project Console output https://builds.apache.org/job/PreCommit-HDFS-Build/16765/console Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        Hide
        ajisakaa Akira Ajisaka added a comment -

        LGTM, +1. The test failures looks unrelated.

        Show
        ajisakaa Akira Ajisaka added a comment - LGTM, +1. The test failures looks unrelated.
        Hide
        linyiqun Yiqun Lin added a comment -

        Thanks Mehran Hassani for working on this. Your patch looks good to me, +1. One of them TestPendingInvalidateBlock was tracked by HDFS-10426, and the other one is not related.

        Show
        linyiqun Yiqun Lin added a comment - Thanks Mehran Hassani for working on this. Your patch looks good to me, +1. One of them TestPendingInvalidateBlock was tracked by HDFS-10426 , and the other one is not related.
        Hide
        ajisakaa Akira Ajisaka added a comment -

        Committed this to trunk, branch-2, and branch-2.8. Thanks Mehran Hassani for the contribution and thanks Yiqun Lin for the review.

        Show
        ajisakaa Akira Ajisaka added a comment - Committed this to trunk, branch-2, and branch-2.8. Thanks Mehran Hassani for the contribution and thanks Yiqun Lin for the review.
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #10447 (See https://builds.apache.org/job/Hadoop-trunk-Commit/10447/)
        HDFS-10862. Typos in 4 log messages. Contributed by Mehran Hassani. (aajisaka: rev b09a03cd7d26cf96ec26a81ba11f00778241eb3e)

        • (edit) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NNStorage.java
        • (edit) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsVolumeList.java
        • (edit) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java
        • (edit) hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/RpcProgramNfs3.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #10447 (See https://builds.apache.org/job/Hadoop-trunk-Commit/10447/ ) HDFS-10862 . Typos in 4 log messages. Contributed by Mehran Hassani. (aajisaka: rev b09a03cd7d26cf96ec26a81ba11f00778241eb3e) (edit) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NNStorage.java (edit) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsVolumeList.java (edit) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java (edit) hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/RpcProgramNfs3.java

          People

          • Assignee:
            MehranHassani Mehran Hassani
            Reporter:
            MehranHassani Mehran Hassani
          • Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development