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

Fix findbugs warnings in BlockRecoveryWorker

    Details

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

      Description

      Noticed following findbug in HDFS-9400

      Call to org.apache.hadoop.hdfs.server.protocol.DatanodeRegistration.equals(org.apache.hadoop.hdfs.protocol.DatanodeInfo) in org.apache.hadoop.hdfs.server.datanode.BlockRecoveryWorker$RecoveryTaskContiguous.recover()
      Bug type EC_UNRELATED_TYPES (click for details) 
      In class org.apache.hadoop.hdfs.server.datanode.BlockRecoveryWorker$RecoveryTaskContiguous
      In method org.apache.hadoop.hdfs.server.datanode.BlockRecoveryWorker$RecoveryTaskContiguous.recover()
      Actual type org.apache.hadoop.hdfs.protocol.DatanodeInfo
      Expected org.apache.hadoop.hdfs.server.protocol.DatanodeRegistration
      Value loaded from id
      Value loaded from bpReg
      org.apache.hadoop.hdfs.server.protocol.DatanodeRegistration.equals(Object) used to determine equality
      At BlockRecoveryWorker.java:[line 116]
      

      https://builds.apache.org/job/PreCommit-HDFS-Build/13433/artifact/patchprocess/branch-findbugs-hadoop-hdfs-project_hadoop-hdfs-warnings.html

      1. HDFS-9401.patch
        1 kB
        Brahma Reddy Battula
      2. HDFS-9401-002.patch
        2 kB
        Brahma Reddy Battula

        Issue Links

          Activity

          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #591 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/591/)
          HDFS-9401. Fix findbugs warnings in BlockRecoveryWorker. Contributed by (waltersu4549: rev 2fda45b9dc9c0bf9bb1380134c80836e89d50471)

          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockRecoveryWorker.java
          • hadoop-hdfs-project/hadoop-hdfs/dev-support/findbugsExcludeFile.xml
          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #591 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/591/ ) HDFS-9401 . Fix findbugs warnings in BlockRecoveryWorker. Contributed by (waltersu4549: rev 2fda45b9dc9c0bf9bb1380134c80836e89d50471) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockRecoveryWorker.java hadoop-hdfs-project/hadoop-hdfs/dev-support/findbugsExcludeFile.xml hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Hdfs-trunk #2530 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2530/)
          HDFS-9401. Fix findbugs warnings in BlockRecoveryWorker. Contributed by (waltersu4549: rev 2fda45b9dc9c0bf9bb1380134c80836e89d50471)

          • hadoop-hdfs-project/hadoop-hdfs/dev-support/findbugsExcludeFile.xml
          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockRecoveryWorker.java
          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk #2530 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2530/ ) HDFS-9401 . Fix findbugs warnings in BlockRecoveryWorker. Contributed by (waltersu4549: rev 2fda45b9dc9c0bf9bb1380134c80836e89d50471) hadoop-hdfs-project/hadoop-hdfs/dev-support/findbugsExcludeFile.xml hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockRecoveryWorker.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #661 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/661/)
          HDFS-9401. Fix findbugs warnings in BlockRecoveryWorker. Contributed by (waltersu4549: rev 2fda45b9dc9c0bf9bb1380134c80836e89d50471)

          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockRecoveryWorker.java
          • hadoop-hdfs-project/hadoop-hdfs/dev-support/findbugsExcludeFile.xml
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #661 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/661/ ) HDFS-9401 . Fix findbugs warnings in BlockRecoveryWorker. Contributed by (waltersu4549: rev 2fda45b9dc9c0bf9bb1380134c80836e89d50471) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockRecoveryWorker.java hadoop-hdfs-project/hadoop-hdfs/dev-support/findbugsExcludeFile.xml
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Mapreduce-trunk #2590 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2590/)
          HDFS-9401. Fix findbugs warnings in BlockRecoveryWorker. Contributed by (waltersu4549: rev 2fda45b9dc9c0bf9bb1380134c80836e89d50471)

          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockRecoveryWorker.java
          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • hadoop-hdfs-project/hadoop-hdfs/dev-support/findbugsExcludeFile.xml
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk #2590 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2590/ ) HDFS-9401 . Fix findbugs warnings in BlockRecoveryWorker. Contributed by (waltersu4549: rev 2fda45b9dc9c0bf9bb1380134c80836e89d50471) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockRecoveryWorker.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/dev-support/findbugsExcludeFile.xml
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #650 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/650/)
          HDFS-9401. Fix findbugs warnings in BlockRecoveryWorker. Contributed by (waltersu4549: rev 2fda45b9dc9c0bf9bb1380134c80836e89d50471)

          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockRecoveryWorker.java
          • hadoop-hdfs-project/hadoop-hdfs/dev-support/findbugsExcludeFile.xml
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #650 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/650/ ) HDFS-9401 . Fix findbugs warnings in BlockRecoveryWorker. Contributed by (waltersu4549: rev 2fda45b9dc9c0bf9bb1380134c80836e89d50471) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockRecoveryWorker.java hadoop-hdfs-project/hadoop-hdfs/dev-support/findbugsExcludeFile.xml
          Hide
          brahmareddy Brahma Reddy Battula added a comment -

          Walter Su thanks for committing and reviewing this issue.

          Show
          brahmareddy Brahma Reddy Battula added a comment - Walter Su thanks for committing and reviewing this issue.
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Yarn-trunk #1384 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/1384/)
          HDFS-9401. Fix findbugs warnings in BlockRecoveryWorker. Contributed by (waltersu4549: rev 2fda45b9dc9c0bf9bb1380134c80836e89d50471)

          • hadoop-hdfs-project/hadoop-hdfs/dev-support/findbugsExcludeFile.xml
          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockRecoveryWorker.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk #1384 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/1384/ ) HDFS-9401 . Fix findbugs warnings in BlockRecoveryWorker. Contributed by (waltersu4549: rev 2fda45b9dc9c0bf9bb1380134c80836e89d50471) hadoop-hdfs-project/hadoop-hdfs/dev-support/findbugsExcludeFile.xml hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockRecoveryWorker.java
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-trunk-Commit #8783 (See https://builds.apache.org/job/Hadoop-trunk-Commit/8783/)
          HDFS-9401. Fix findbugs warnings in BlockRecoveryWorker. Contributed by (waltersu4549: rev 2fda45b9dc9c0bf9bb1380134c80836e89d50471)

          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • hadoop-hdfs-project/hadoop-hdfs/dev-support/findbugsExcludeFile.xml
          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockRecoveryWorker.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #8783 (See https://builds.apache.org/job/Hadoop-trunk-Commit/8783/ ) HDFS-9401 . Fix findbugs warnings in BlockRecoveryWorker. Contributed by (waltersu4549: rev 2fda45b9dc9c0bf9bb1380134c80836e89d50471) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/dev-support/findbugsExcludeFile.xml hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockRecoveryWorker.java
          Hide
          walter.k.su Walter Su added a comment -

          committed to trunk and branch-2.

          Show
          walter.k.su Walter Su added a comment - committed to trunk and branch-2.
          Hide
          walter.k.su Walter Su added a comment -

          +1. Thanks Brahma Reddy Battula for contribution. And Thanks Chris Nauroth for the detail. The jenkins output looks good.

          Show
          walter.k.su Walter Su added a comment - +1. Thanks Brahma Reddy Battula for contribution. And Thanks Chris Nauroth for the detail. The jenkins output looks good.
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 12s docker + precommit patch detected.
          +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.
          +1 mvninstall 3m 33s trunk passed
          +1 compile 0m 44s trunk passed with JDK v1.8.0_66
          +1 compile 0m 39s trunk passed with JDK v1.7.0_79
          +1 checkstyle 0m 20s trunk passed
          +1 mvneclipse 0m 16s trunk passed
          -1 findbugs 2m 21s hadoop-hdfs-project/hadoop-hdfs in trunk has 1 extant Findbugs warnings.
          +1 javadoc 1m 28s trunk passed with JDK v1.8.0_66
          +1 javadoc 2m 6s trunk passed with JDK v1.7.0_79
          +1 mvninstall 0m 46s the patch passed
          +1 compile 0m 39s the patch passed with JDK v1.8.0_66
          +1 javac 0m 39s the patch passed
          +1 compile 0m 37s the patch passed with JDK v1.7.0_79
          +1 javac 0m 37s the patch passed
          +1 checkstyle 0m 18s the patch passed
          +1 mvneclipse 0m 15s the patch passed
          +1 whitespace 0m 0s Patch has no whitespace issues.
          +1 xml 0m 1s The patch has no ill-formed XML file.
          +1 findbugs 2m 22s the patch passed
          +1 javadoc 1m 20s the patch passed with JDK v1.8.0_66
          +1 javadoc 2m 11s the patch passed with JDK v1.7.0_79
          -1 unit 78m 33s hadoop-hdfs in the patch failed with JDK v1.8.0_66.
          -1 unit 72m 19s hadoop-hdfs in the patch failed with JDK v1.7.0_79.
          -1 asflicense 0m 22s Patch generated 56 ASF License warnings.
          174m 29s



          Reason Tests
          JDK v1.8.0_66 Failed junit tests hadoop.hdfs.server.datanode.TestBlockScanner
            hadoop.hdfs.server.namenode.ha.TestRetryCacheWithHA
            hadoop.hdfs.server.datanode.TestBlockReplacement
            hadoop.hdfs.server.namenode.TestNamenodeCapacityReport
            hadoop.hdfs.server.namenode.TestFileTruncate
            hadoop.hdfs.TestEncryptionZones
            hadoop.hdfs.TestDFSClientRetries
            hadoop.hdfs.server.datanode.TestDirectoryScanner
          JDK v1.7.0_79 Failed junit tests hadoop.hdfs.shortcircuit.TestShortCircuitCache
            hadoop.hdfs.server.blockmanagement.TestBlocksWithNotEnoughRacks
            hadoop.hdfs.server.datanode.TestDataNodeHotSwapVolumes
            hadoop.hdfs.server.namenode.TestBlockPlacementPolicyRackFaultTolerant
            hadoop.hdfs.server.namenode.TestDecommissioningStatus
            hadoop.hdfs.server.blockmanagement.TestNodeCount
            hadoop.hdfs.TestDFSStripedOutputStreamWithFailure030



          Subsystem Report/Notes
          Docker Client=1.7.0 Server=1.7.0 Image:test-patch-base-hadoop-date2015-11-10
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12771484/HDFS-9401-002.patch
          JIRA Issue HDFS-9401
          Optional Tests asflicense xml javac javadoc mvninstall unit findbugs checkstyle compile
          uname Linux 95efcdc0d414 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 /home/jenkins/jenkins-slave/workspace/PreCommit-HDFS-Build/patchprocess/apache-yetus-ee5baeb/precommit/personality/hadoop.sh
          git revision trunk / 94a1833
          Default Java 1.7.0_79
          Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_66 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_79
          findbugs v3.0.0
          findbugs https://builds.apache.org/job/PreCommit-HDFS-Build/13451/artifact/patchprocess/branch-findbugs-hadoop-hdfs-project_hadoop-hdfs-warnings.html
          unit https://builds.apache.org/job/PreCommit-HDFS-Build/13451/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.8.0_66.txt
          unit https://builds.apache.org/job/PreCommit-HDFS-Build/13451/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_79.txt
          unit test logs https://builds.apache.org/job/PreCommit-HDFS-Build/13451/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.8.0_66.txt https://builds.apache.org/job/PreCommit-HDFS-Build/13451/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_79.txt
          JDK v1.7.0_79 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/13451/testReport/
          asflicense https://builds.apache.org/job/PreCommit-HDFS-Build/13451/artifact/patchprocess/patch-asflicense-problems.txt
          modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
          Max memory used 228MB
          Powered by Apache Yetus http://yetus.apache.org
          Console output https://builds.apache.org/job/PreCommit-HDFS-Build/13451/console

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 12s docker + precommit patch detected. +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. +1 mvninstall 3m 33s trunk passed +1 compile 0m 44s trunk passed with JDK v1.8.0_66 +1 compile 0m 39s trunk passed with JDK v1.7.0_79 +1 checkstyle 0m 20s trunk passed +1 mvneclipse 0m 16s trunk passed -1 findbugs 2m 21s hadoop-hdfs-project/hadoop-hdfs in trunk has 1 extant Findbugs warnings. +1 javadoc 1m 28s trunk passed with JDK v1.8.0_66 +1 javadoc 2m 6s trunk passed with JDK v1.7.0_79 +1 mvninstall 0m 46s the patch passed +1 compile 0m 39s the patch passed with JDK v1.8.0_66 +1 javac 0m 39s the patch passed +1 compile 0m 37s the patch passed with JDK v1.7.0_79 +1 javac 0m 37s the patch passed +1 checkstyle 0m 18s the patch passed +1 mvneclipse 0m 15s the patch passed +1 whitespace 0m 0s Patch has no whitespace issues. +1 xml 0m 1s The patch has no ill-formed XML file. +1 findbugs 2m 22s the patch passed +1 javadoc 1m 20s the patch passed with JDK v1.8.0_66 +1 javadoc 2m 11s the patch passed with JDK v1.7.0_79 -1 unit 78m 33s hadoop-hdfs in the patch failed with JDK v1.8.0_66. -1 unit 72m 19s hadoop-hdfs in the patch failed with JDK v1.7.0_79. -1 asflicense 0m 22s Patch generated 56 ASF License warnings. 174m 29s Reason Tests JDK v1.8.0_66 Failed junit tests hadoop.hdfs.server.datanode.TestBlockScanner   hadoop.hdfs.server.namenode.ha.TestRetryCacheWithHA   hadoop.hdfs.server.datanode.TestBlockReplacement   hadoop.hdfs.server.namenode.TestNamenodeCapacityReport   hadoop.hdfs.server.namenode.TestFileTruncate   hadoop.hdfs.TestEncryptionZones   hadoop.hdfs.TestDFSClientRetries   hadoop.hdfs.server.datanode.TestDirectoryScanner JDK v1.7.0_79 Failed junit tests hadoop.hdfs.shortcircuit.TestShortCircuitCache   hadoop.hdfs.server.blockmanagement.TestBlocksWithNotEnoughRacks   hadoop.hdfs.server.datanode.TestDataNodeHotSwapVolumes   hadoop.hdfs.server.namenode.TestBlockPlacementPolicyRackFaultTolerant   hadoop.hdfs.server.namenode.TestDecommissioningStatus   hadoop.hdfs.server.blockmanagement.TestNodeCount   hadoop.hdfs.TestDFSStripedOutputStreamWithFailure030 Subsystem Report/Notes Docker Client=1.7.0 Server=1.7.0 Image:test-patch-base-hadoop-date2015-11-10 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12771484/HDFS-9401-002.patch JIRA Issue HDFS-9401 Optional Tests asflicense xml javac javadoc mvninstall unit findbugs checkstyle compile uname Linux 95efcdc0d414 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 /home/jenkins/jenkins-slave/workspace/PreCommit-HDFS-Build/patchprocess/apache-yetus-ee5baeb/precommit/personality/hadoop.sh git revision trunk / 94a1833 Default Java 1.7.0_79 Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_66 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_79 findbugs v3.0.0 findbugs https://builds.apache.org/job/PreCommit-HDFS-Build/13451/artifact/patchprocess/branch-findbugs-hadoop-hdfs-project_hadoop-hdfs-warnings.html unit https://builds.apache.org/job/PreCommit-HDFS-Build/13451/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.8.0_66.txt unit https://builds.apache.org/job/PreCommit-HDFS-Build/13451/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_79.txt unit test logs https://builds.apache.org/job/PreCommit-HDFS-Build/13451/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.8.0_66.txt https://builds.apache.org/job/PreCommit-HDFS-Build/13451/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_79.txt JDK v1.7.0_79 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/13451/testReport/ asflicense https://builds.apache.org/job/PreCommit-HDFS-Build/13451/artifact/patchprocess/patch-asflicense-problems.txt modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Max memory used 228MB Powered by Apache Yetus http://yetus.apache.org Console output https://builds.apache.org/job/PreCommit-HDFS-Build/13451/console This message was automatically generated.
          Hide
          brahmareddy Brahma Reddy Battula added a comment -

          Chris Nauroth did not seen the exclude.xml.Thanks for pointing the same..But it is not taking effect since class name given as datanode,hence I am removing from exclude.xml...Walter Su and Chris Nauroth kindly take a look at latest patch..

          Show
          brahmareddy Brahma Reddy Battula added a comment - Chris Nauroth did not seen the exclude.xml.Thanks for pointing the same..But it is not taking effect since class name given as datanode,hence I am removing from exclude.xml... Walter Su and Chris Nauroth kindly take a look at latest patch..
          Hide
          cnauroth Chris Nauroth added a comment -

          It appears this was introduced by HDFS-9255. Prior to HDFS-9255, the relevant code was in DataNode#recoverBlock:

            /** Recover a block */
            private void recoverBlock(RecoveringBlock rBlock) throws IOException {
              ExtendedBlock block = rBlock.getBlock();
              String blookPoolId = block.getBlockPoolId();
              DatanodeID[] datanodeids = rBlock.getLocations();
              List<BlockRecord> syncList = new ArrayList<BlockRecord>(datanodeids.length);
              int errorCount = 0;
          
              //check generation stamps
              for(DatanodeID id : datanodeids) {
                try {
                  BPOfferService bpos = blockPoolManager.get(blookPoolId);
                  DatanodeRegistration bpReg = bpos.bpRegistration;
                  InterDatanodeProtocol datanode = bpReg.equals(id)?
                      this: DataNode.createInterDataNodeProtocolProxy(id, getConf(),
                          dnConf.socketTimeout, dnConf.connectToDnViaHostname);
          

          There is a Findbugs suppression defined on that method:

               <!-- Don't complain about recoverBlock equality check -->
               <Match>
                 <Class name="org.apache.hadoop.hdfs.server.datanode.DataNode" />
                 <Method name="recoverBlock" />
                 <Bug pattern="EC_UNRELATED_TYPES" />
               </Match>
          

          HDFS-3837 describes the rationale for that suppression.

          The HDFS-9255 refactoring moved this logic to BlockRecoveryWorker, but it did not update the Findbugs suppression.

          Walter Su, would you please help review and fix this? Thanks!

          Show
          cnauroth Chris Nauroth added a comment - It appears this was introduced by HDFS-9255 . Prior to HDFS-9255 , the relevant code was in DataNode#recoverBlock : /** Recover a block */ private void recoverBlock(RecoveringBlock rBlock) throws IOException { ExtendedBlock block = rBlock.getBlock(); String blookPoolId = block.getBlockPoolId(); DatanodeID[] datanodeids = rBlock.getLocations(); List<BlockRecord> syncList = new ArrayList<BlockRecord>(datanodeids.length); int errorCount = 0; //check generation stamps for (DatanodeID id : datanodeids) { try { BPOfferService bpos = blockPoolManager.get(blookPoolId); DatanodeRegistration bpReg = bpos.bpRegistration; InterDatanodeProtocol datanode = bpReg.equals(id)? this : DataNode.createInterDataNodeProtocolProxy(id, getConf(), dnConf.socketTimeout, dnConf.connectToDnViaHostname); There is a Findbugs suppression defined on that method: <!-- Don't complain about recoverBlock equality check --> <Match> < Class name= "org.apache.hadoop.hdfs.server.datanode.DataNode" /> <Method name= "recoverBlock" /> <Bug pattern= "EC_UNRELATED_TYPES" /> </Match> HDFS-3837 describes the rationale for that suppression. The HDFS-9255 refactoring moved this logic to BlockRecoveryWorker , but it did not update the Findbugs suppression. Walter Su , would you please help review and fix this? Thanks!
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 8s docker + precommit patch detected.
          +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.
          +1 mvninstall 3m 32s trunk passed
          +1 compile 0m 40s trunk passed with JDK v1.8.0_66
          +1 compile 0m 40s trunk passed with JDK v1.7.0_79
          +1 checkstyle 0m 18s trunk passed
          +1 mvneclipse 0m 16s trunk passed
          -1 findbugs 2m 21s hadoop-hdfs-project/hadoop-hdfs in trunk has 1 extant Findbugs warnings.
          +1 javadoc 1m 28s trunk passed with JDK v1.8.0_66
          +1 javadoc 2m 14s trunk passed with JDK v1.7.0_79
          +1 mvninstall 0m 48s the patch passed
          +1 compile 0m 43s the patch passed with JDK v1.8.0_66
          +1 javac 0m 43s the patch passed
          +1 compile 0m 39s the patch passed with JDK v1.7.0_79
          +1 javac 0m 39s the patch passed
          +1 checkstyle 0m 18s the patch passed
          +1 mvneclipse 0m 16s the patch passed
          +1 whitespace 0m 0s Patch has no whitespace issues.
          +1 findbugs 2m 31s the patch passed
          +1 javadoc 1m 24s the patch passed with JDK v1.8.0_66
          +1 javadoc 2m 7s the patch passed with JDK v1.7.0_79
          -1 unit 77m 5s hadoop-hdfs in the patch failed with JDK v1.8.0_66.
          -1 unit 76m 10s hadoop-hdfs in the patch failed with JDK v1.7.0_79.
          -1 asflicense 0m 22s Patch generated 56 ASF License warnings.
          177m 6s



          Reason Tests
          JDK v1.8.0_66 Failed junit tests hadoop.hdfs.server.datanode.TestBlockScanner
            hadoop.hdfs.server.namenode.TestNameNodeMetadataConsistency
            hadoop.hdfs.shortcircuit.TestShortCircuitCache
            hadoop.hdfs.server.blockmanagement.TestNodeCount
            hadoop.hdfs.server.datanode.TestDirectoryScanner
          JDK v1.7.0_79 Failed junit tests hadoop.hdfs.TestLeaseRecovery2
            hadoop.hdfs.server.namenode.ha.TestDNFencing
            hadoop.hdfs.server.namenode.ha.TestEditLogTailer
            hadoop.hdfs.server.namenode.ha.TestStandbyCheckpoints
            hadoop.hdfs.server.namenode.ha.TestRequestHedgingProxyProvider
            hadoop.hdfs.server.blockmanagement.TestNodeCount



          Subsystem Report/Notes
          Docker Client=1.7.0 Server=1.7.0 Image:test-patch-base-hadoop-date2015-11-09
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12771332/HDFS-9401.patch
          JIRA Issue HDFS-9401
          Optional Tests asflicense javac javadoc mvninstall unit findbugs checkstyle compile
          uname Linux 74475ede9ce6 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 /home/jenkins/jenkins-slave/workspace/PreCommit-HDFS-Build/patchprocess/apache-yetus-ee5baeb/precommit/personality/hadoop.sh
          git revision trunk / 668e897
          Default Java 1.7.0_79
          Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_66 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_79
          findbugs v3.0.0
          findbugs https://builds.apache.org/job/PreCommit-HDFS-Build/13437/artifact/patchprocess/branch-findbugs-hadoop-hdfs-project_hadoop-hdfs-warnings.html
          unit https://builds.apache.org/job/PreCommit-HDFS-Build/13437/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.8.0_66.txt
          unit https://builds.apache.org/job/PreCommit-HDFS-Build/13437/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_79.txt
          unit test logs https://builds.apache.org/job/PreCommit-HDFS-Build/13437/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.8.0_66.txt https://builds.apache.org/job/PreCommit-HDFS-Build/13437/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_79.txt
          JDK v1.7.0_79 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/13437/testReport/
          asflicense https://builds.apache.org/job/PreCommit-HDFS-Build/13437/artifact/patchprocess/patch-asflicense-problems.txt
          modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
          Max memory used 225MB
          Powered by Apache Yetus http://yetus.apache.org
          Console output https://builds.apache.org/job/PreCommit-HDFS-Build/13437/console

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 8s docker + precommit patch detected. +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. +1 mvninstall 3m 32s trunk passed +1 compile 0m 40s trunk passed with JDK v1.8.0_66 +1 compile 0m 40s trunk passed with JDK v1.7.0_79 +1 checkstyle 0m 18s trunk passed +1 mvneclipse 0m 16s trunk passed -1 findbugs 2m 21s hadoop-hdfs-project/hadoop-hdfs in trunk has 1 extant Findbugs warnings. +1 javadoc 1m 28s trunk passed with JDK v1.8.0_66 +1 javadoc 2m 14s trunk passed with JDK v1.7.0_79 +1 mvninstall 0m 48s the patch passed +1 compile 0m 43s the patch passed with JDK v1.8.0_66 +1 javac 0m 43s the patch passed +1 compile 0m 39s the patch passed with JDK v1.7.0_79 +1 javac 0m 39s the patch passed +1 checkstyle 0m 18s the patch passed +1 mvneclipse 0m 16s the patch passed +1 whitespace 0m 0s Patch has no whitespace issues. +1 findbugs 2m 31s the patch passed +1 javadoc 1m 24s the patch passed with JDK v1.8.0_66 +1 javadoc 2m 7s the patch passed with JDK v1.7.0_79 -1 unit 77m 5s hadoop-hdfs in the patch failed with JDK v1.8.0_66. -1 unit 76m 10s hadoop-hdfs in the patch failed with JDK v1.7.0_79. -1 asflicense 0m 22s Patch generated 56 ASF License warnings. 177m 6s Reason Tests JDK v1.8.0_66 Failed junit tests hadoop.hdfs.server.datanode.TestBlockScanner   hadoop.hdfs.server.namenode.TestNameNodeMetadataConsistency   hadoop.hdfs.shortcircuit.TestShortCircuitCache   hadoop.hdfs.server.blockmanagement.TestNodeCount   hadoop.hdfs.server.datanode.TestDirectoryScanner JDK v1.7.0_79 Failed junit tests hadoop.hdfs.TestLeaseRecovery2   hadoop.hdfs.server.namenode.ha.TestDNFencing   hadoop.hdfs.server.namenode.ha.TestEditLogTailer   hadoop.hdfs.server.namenode.ha.TestStandbyCheckpoints   hadoop.hdfs.server.namenode.ha.TestRequestHedgingProxyProvider   hadoop.hdfs.server.blockmanagement.TestNodeCount Subsystem Report/Notes Docker Client=1.7.0 Server=1.7.0 Image:test-patch-base-hadoop-date2015-11-09 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12771332/HDFS-9401.patch JIRA Issue HDFS-9401 Optional Tests asflicense javac javadoc mvninstall unit findbugs checkstyle compile uname Linux 74475ede9ce6 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 /home/jenkins/jenkins-slave/workspace/PreCommit-HDFS-Build/patchprocess/apache-yetus-ee5baeb/precommit/personality/hadoop.sh git revision trunk / 668e897 Default Java 1.7.0_79 Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_66 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_79 findbugs v3.0.0 findbugs https://builds.apache.org/job/PreCommit-HDFS-Build/13437/artifact/patchprocess/branch-findbugs-hadoop-hdfs-project_hadoop-hdfs-warnings.html unit https://builds.apache.org/job/PreCommit-HDFS-Build/13437/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.8.0_66.txt unit https://builds.apache.org/job/PreCommit-HDFS-Build/13437/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_79.txt unit test logs https://builds.apache.org/job/PreCommit-HDFS-Build/13437/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.8.0_66.txt https://builds.apache.org/job/PreCommit-HDFS-Build/13437/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_79.txt JDK v1.7.0_79 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/13437/testReport/ asflicense https://builds.apache.org/job/PreCommit-HDFS-Build/13437/artifact/patchprocess/patch-asflicense-problems.txt modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Max memory used 225MB Powered by Apache Yetus http://yetus.apache.org Console output https://builds.apache.org/job/PreCommit-HDFS-Build/13437/console This message was automatically generated.
          Hide
          brahmareddy Brahma Reddy Battula added a comment -
          DatanodeID bpReg =datanode.getBPOfferService(bpid).bpRegistration;

          reference is DataNodeId, but it is instance of Datanoderegistration . so since Datanoderegisration have equals() overridden.

          wrapping bpReg with a new DatanodeID object.so we can compare 2 DatanodeIDs..Uploaded the patch for same ..kindly review..

          Show
          brahmareddy Brahma Reddy Battula added a comment - DatanodeID bpReg =datanode.getBPOfferService(bpid).bpRegistration; reference is DataNodeId, but it is instance of Datanoderegistration . so since Datanoderegisration have equals() overridden. wrapping bpReg with a new DatanodeID object.so we can compare 2 DatanodeIDs..Uploaded the patch for same ..kindly review..

            People

            • Assignee:
              brahmareddy Brahma Reddy Battula
              Reporter:
              brahmareddy Brahma Reddy Battula
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development