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

Remove unused import in TestCompressorDecompressor.java

    Details

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

      Description

      The fix for HADOOP-12590 left an unused import in TestCompressorDecompressor.java.

      After uploading the patch for HADOOP-12590, I spotted the problem in IntelliJ which marked the unused import gray, but it was too late.

      The problem was not detected by precommit check because test source files are not checked by checkstyle by default. Maven checkstyle plugin parameter includeTestSourceDirectory is false by default.

        Issue Links

          Activity

          Hide
          jzhuge John Zhuge added a comment -

          Thanks Akira Ajisaka, really appreciate it !

          Show
          jzhuge John Zhuge added a comment - Thanks Akira Ajisaka , really appreciate it !
          Hide
          yzhangal Yongjun Zhang added a comment -

          Thanks Akira Ajisaka!

          Show
          yzhangal Yongjun Zhang added a comment - Thanks Akira Ajisaka !
          Hide
          ajisakaa Akira Ajisaka added a comment -

          Committed this to branch-2.8.

          Show
          ajisakaa Akira Ajisaka added a comment - Committed this to branch-2.8.
          Hide
          ajisakaa Akira Ajisaka added a comment -

          I'm reverting this change from branch-2.8 for now.

          Thanks Yongjun Zhang for reverting this. As HADOOP-12590 is committed to branch-2.8, I'll commit this again shortly.

          Show
          ajisakaa Akira Ajisaka added a comment - I'm reverting this change from branch-2.8 for now. Thanks Yongjun Zhang for reverting this. As HADOOP-12590 is committed to branch-2.8, I'll commit this again shortly.
          Hide
          ajisakaa Akira Ajisaka added a comment -

          Could someone commit HADOOP-12590 to branch-2.8?

          Done. Thanks Yongjun and John for the comments.

          Show
          ajisakaa Akira Ajisaka added a comment - Could someone commit HADOOP-12590 to branch-2.8? Done. Thanks Yongjun and John for the comments.
          Hide
          jzhuge John Zhuge added a comment -

          This is because this jira depends on HADOOP-12590 that is only committed to "trunk":

          $ git log --grep HADOOP-12590 asflive/trunk
          commit d7ed04758c1bdb1c7caf5cf3a03da3ad81701957
          Author: Steve Loughran <stevel@apache.org>
          Date:   Sat Jan 9 11:10:20 2016 +0000
          
              HADOOP-12590. TestCompressorDecompressor failing without stack traces  (John Zhuge via stevel)
          $ git log --grep HADOOP-12590 asflive/branch-2.7
          $ git log --grep HADOOP-12590 asflive/branch-2.8
          

          Could someone commit HADOOP-12590 to branch-2.8?

          Show
          jzhuge John Zhuge added a comment - This is because this jira depends on HADOOP-12590 that is only committed to "trunk": $ git log --grep HADOOP-12590 asflive/trunk commit d7ed04758c1bdb1c7caf5cf3a03da3ad81701957 Author: Steve Loughran <stevel@apache.org> Date: Sat Jan 9 11:10:20 2016 +0000 HADOOP-12590. TestCompressorDecompressor failing without stack traces (John Zhuge via stevel) $ git log --grep HADOOP-12590 asflive/branch-2.7 $ git log --grep HADOOP-12590 asflive/branch-2.8 Could someone commit HADOOP-12590 to branch-2.8?
          Hide
          yzhangal Yongjun Zhang added a comment -

          Hi Guys,

          I found that the commit to 2.8 breaks the build. The same file actually use the removed import in 2.8.

          I'm reverting this change from branch-2.8 for now. I guess the reason is that some changes done in trunk/branch-2 are not in 2.8.

          Thanks.

          Show
          yzhangal Yongjun Zhang added a comment - Hi Guys, I found that the commit to 2.8 breaks the build. The same file actually use the removed import in 2.8. I'm reverting this change from branch-2.8 for now. I guess the reason is that some changes done in trunk/branch-2 are not in 2.8. Thanks.
          Hide
          jzhuge John Zhuge added a comment -

          Thanks Akira Ajisaka for the review and commit.

          Show
          jzhuge John Zhuge added a comment - Thanks Akira Ajisaka for the review and commit.
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-trunk-Commit #9110 (See https://builds.apache.org/job/Hadoop-trunk-Commit/9110/)
          HADOOP-12700. Remove unused import in TestCompressorDecompressor.java. (aajisaka: rev ff8758377cf68b650c5f119a377ff86055b8d3f2)

          • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/compress/TestCompressorDecompressor.java
          • hadoop-common-project/hadoop-common/CHANGES.txt
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #9110 (See https://builds.apache.org/job/Hadoop-trunk-Commit/9110/ ) HADOOP-12700 . Remove unused import in TestCompressorDecompressor.java. (aajisaka: rev ff8758377cf68b650c5f119a377ff86055b8d3f2) hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/compress/TestCompressorDecompressor.java hadoop-common-project/hadoop-common/CHANGES.txt
          Hide
          ajisakaa Akira Ajisaka added a comment -

          Committed this to trunk, branch-2, and branch-2.8. Thanks John Zhuge for the contribution.

          Show
          ajisakaa Akira Ajisaka added a comment - Committed this to trunk, branch-2, and branch-2.8. Thanks John Zhuge for the contribution.
          Hide
          ajisakaa Akira Ajisaka added a comment -

          LGTM, +1.

          Show
          ajisakaa Akira Ajisaka added a comment - LGTM, +1.
          Hide
          jzhuge John Zhuge added a comment -

          Steve Loughran,

          Could you please review this quick fix, a followup to HADOOP-12590?

          Thanks,
          John.

          Show
          jzhuge John Zhuge added a comment - Steve Loughran , Could you please review this quick fix, a followup to HADOOP-12590 ? Thanks, John.
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 0s 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 43s trunk passed
          +1 compile 7m 43s trunk passed with JDK v1.8.0_66
          +1 compile 8m 27s trunk passed with JDK v1.7.0_91
          +1 checkstyle 0m 16s trunk passed
          +1 mvnsite 1m 3s trunk passed
          +1 mvneclipse 0m 14s trunk passed
          +1 findbugs 1m 46s trunk passed
          +1 javadoc 0m 52s trunk passed with JDK v1.8.0_66
          +1 javadoc 1m 2s trunk passed with JDK v1.7.0_91
          +1 mvninstall 1m 42s the patch passed
          +1 compile 7m 31s the patch passed with JDK v1.8.0_66
          +1 javac 7m 31s the patch passed
          +1 compile 8m 30s the patch passed with JDK v1.7.0_91
          +1 javac 8m 30s the patch passed
          +1 checkstyle 0m 17s the patch passed
          +1 mvnsite 1m 1s the patch passed
          +1 mvneclipse 0m 15s the patch passed
          +1 whitespace 0m 0s Patch has no whitespace issues.
          +1 findbugs 1m 58s the patch passed
          +1 javadoc 1m 2s the patch passed with JDK v1.8.0_66
          +1 javadoc 1m 3s the patch passed with JDK v1.7.0_91
          -1 unit 8m 4s hadoop-common in the patch failed with JDK v1.8.0_66.
          +1 unit 7m 26s hadoop-common in the patch passed with JDK v1.7.0_91.
          +1 asflicense 0m 23s Patch does not generate ASF License warnings.
          69m 41s



          Reason Tests
          JDK v1.8.0_66 Failed junit tests hadoop.ha.TestZKFailoverController



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:0ca8df7
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12781480/HADOOP-12700.001.patch
          JIRA Issue HADOOP-12700
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux e4b683bbbb6c 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 / 0e76f1f
          Default Java 1.7.0_91
          Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_66 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_91
          findbugs v3.0.0
          unit https://builds.apache.org/job/PreCommit-HADOOP-Build/8380/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.8.0_66.txt
          unit test logs https://builds.apache.org/job/PreCommit-HADOOP-Build/8380/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.8.0_66.txt
          JDK v1.7.0_91 Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/8380/testReport/
          modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common
          Max memory used 76MB
          Powered by Apache Yetus 0.2.0-SNAPSHOT http://yetus.apache.org
          Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/8380/console

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 0s 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 43s trunk passed +1 compile 7m 43s trunk passed with JDK v1.8.0_66 +1 compile 8m 27s trunk passed with JDK v1.7.0_91 +1 checkstyle 0m 16s trunk passed +1 mvnsite 1m 3s trunk passed +1 mvneclipse 0m 14s trunk passed +1 findbugs 1m 46s trunk passed +1 javadoc 0m 52s trunk passed with JDK v1.8.0_66 +1 javadoc 1m 2s trunk passed with JDK v1.7.0_91 +1 mvninstall 1m 42s the patch passed +1 compile 7m 31s the patch passed with JDK v1.8.0_66 +1 javac 7m 31s the patch passed +1 compile 8m 30s the patch passed with JDK v1.7.0_91 +1 javac 8m 30s the patch passed +1 checkstyle 0m 17s the patch passed +1 mvnsite 1m 1s the patch passed +1 mvneclipse 0m 15s the patch passed +1 whitespace 0m 0s Patch has no whitespace issues. +1 findbugs 1m 58s the patch passed +1 javadoc 1m 2s the patch passed with JDK v1.8.0_66 +1 javadoc 1m 3s the patch passed with JDK v1.7.0_91 -1 unit 8m 4s hadoop-common in the patch failed with JDK v1.8.0_66. +1 unit 7m 26s hadoop-common in the patch passed with JDK v1.7.0_91. +1 asflicense 0m 23s Patch does not generate ASF License warnings. 69m 41s Reason Tests JDK v1.8.0_66 Failed junit tests hadoop.ha.TestZKFailoverController Subsystem Report/Notes Docker Image:yetus/hadoop:0ca8df7 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12781480/HADOOP-12700.001.patch JIRA Issue HADOOP-12700 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux e4b683bbbb6c 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 / 0e76f1f Default Java 1.7.0_91 Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_66 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_91 findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-HADOOP-Build/8380/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.8.0_66.txt unit test logs https://builds.apache.org/job/PreCommit-HADOOP-Build/8380/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.8.0_66.txt JDK v1.7.0_91 Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/8380/testReport/ modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common Max memory used 76MB Powered by Apache Yetus 0.2.0-SNAPSHOT http://yetus.apache.org Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/8380/console This message was automatically generated.
          Hide
          jzhuge John Zhuge added a comment -

          Filed HADOOP-12701 to run checkstyle on test source files.

          Show
          jzhuge John Zhuge added a comment - Filed HADOOP-12701 to run checkstyle on test source files.

            People

            • Assignee:
              jzhuge John Zhuge
              Reporter:
              jzhuge John Zhuge
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development