Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-3837

Fix DataNode.recoverBlock findbugs warning

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-alpha
    • Fix Version/s: 2.0.2-alpha
    • Component/s: datanode
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      HDFS-2686 introduced the following findbugs warning:

      Call to equals() comparing different types in org.apache.hadoop.hdfs.server.datanode.DataNode.recoverBlock(BlockRecoveryCommand$RecoveringBlock)
      

      Both are using DatanodeID#equals but it's a different method because DNR#equals overrides equals for some reason (doesn't change behavior).

      1. hdfs-3837.txt
        0.8 kB
        Eli Collins
      2. hdfs-3837.txt
        4 kB
        Eli Collins
      3. hdfs-3837.txt
        4 kB
        Eli Collins
      4. hdfs-3837.txt
        7 kB
        Eli Collins
      5. hdfs-3837.txt
        0.8 kB
        Eli Collins

        Issue Links

          Activity

          Hide
          Eli Collins added a comment -

          Patch attached. Rather than cast bpReg to DatanodeID let's just the methods DatanodeRegistration overrides from DatanodeID (but just calls the parent method anyway).

          Show
          Eli Collins added a comment - Patch attached. Rather than cast bpReg to DatanodeID let's just the methods DatanodeRegistration overrides from DatanodeID (but just calls the parent method anyway).
          Hide
          Suresh Srinivas added a comment -

          I had created HDFS-3836 for this. +1 for the patch.

          Show
          Suresh Srinivas added a comment - I had created HDFS-3836 for this. +1 for the patch.
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Common-trunk-Commit #2618 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/2618/)
          HDFS-3837. Fix DataNode.recoverBlock findbugs warning. Contributed by Eli Collins (Revision 1376129)

          Result = SUCCESS
          eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1376129
          Files :

          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/DatanodeRegistration.java
          Show
          Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #2618 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/2618/ ) HDFS-3837 . Fix DataNode.recoverBlock findbugs warning. Contributed by Eli Collins (Revision 1376129) Result = SUCCESS eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1376129 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/DatanodeRegistration.java
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Hdfs-trunk-Commit #2682 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/2682/)
          HDFS-3837. Fix DataNode.recoverBlock findbugs warning. Contributed by Eli Collins (Revision 1376129)

          Result = SUCCESS
          eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1376129
          Files :

          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/DatanodeRegistration.java
          Show
          Hudson added a comment - Integrated in Hadoop-Hdfs-trunk-Commit #2682 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/2682/ ) HDFS-3837 . Fix DataNode.recoverBlock findbugs warning. Contributed by Eli Collins (Revision 1376129) Result = SUCCESS eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1376129 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/DatanodeRegistration.java
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Mapreduce-trunk-Commit #2648 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/2648/)
          HDFS-3837. Fix DataNode.recoverBlock findbugs warning. Contributed by Eli Collins (Revision 1376129)

          Result = FAILURE
          eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1376129
          Files :

          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/DatanodeRegistration.java
          Show
          Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk-Commit #2648 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/2648/ ) HDFS-3837 . Fix DataNode.recoverBlock findbugs warning. Contributed by Eli Collins (Revision 1376129) Result = FAILURE eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1376129 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/DatanodeRegistration.java
          Hide
          Eli Collins added a comment -

          Thanks Suresh. Arg, accidentally committed before test patch came back. I'll keep an eye on the subsequent run.

          Show
          Eli Collins added a comment - Thanks Suresh. Arg, accidentally committed before test patch came back. I'll keep an eye on the subsequent run.
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Hdfs-trunk #1143 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1143/)
          HDFS-3837. Fix DataNode.recoverBlock findbugs warning. Contributed by Eli Collins (Revision 1376129)

          Result = FAILURE
          eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1376129
          Files :

          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/DatanodeRegistration.java
          Show
          Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #1143 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1143/ ) HDFS-3837 . Fix DataNode.recoverBlock findbugs warning. Contributed by Eli Collins (Revision 1376129) Result = FAILURE eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1376129 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/DatanodeRegistration.java
          Hide
          Eli Collins added a comment -

          Working on HDFS-3850 for the follow up.

          Show
          Eli Collins added a comment - Working on HDFS-3850 for the follow up.
          Hide
          Eli Collins added a comment -

          Re-opening this one, reverted the previous patch will post a new one.

          Show
          Eli Collins added a comment - Re-opening this one, reverted the previous patch will post a new one.
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Hdfs-trunk-Commit #2695 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/2695/)
          Revert HDFS-3837. Fix DataNode.recoverBlock findbugs warning. (Revision 1376701)

          Result = SUCCESS
          eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1376701
          Files :

          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/DatanodeRegistration.java
          Show
          Hudson added a comment - Integrated in Hadoop-Hdfs-trunk-Commit #2695 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/2695/ ) Revert HDFS-3837 . Fix DataNode.recoverBlock findbugs warning. (Revision 1376701) Result = SUCCESS eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1376701 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/DatanodeRegistration.java
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Common-trunk-Commit #2631 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/2631/)
          Revert HDFS-3837. Fix DataNode.recoverBlock findbugs warning. (Revision 1376701)

          Result = SUCCESS
          eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1376701
          Files :

          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/DatanodeRegistration.java
          Show
          Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #2631 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/2631/ ) Revert HDFS-3837 . Fix DataNode.recoverBlock findbugs warning. (Revision 1376701) Result = SUCCESS eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1376701 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/DatanodeRegistration.java
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Mapreduce-trunk-Commit #2659 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/2659/)
          Revert HDFS-3837. Fix DataNode.recoverBlock findbugs warning. (Revision 1376701)

          Result = FAILURE
          eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1376701
          Files :

          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/DatanodeRegistration.java
          Show
          Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk-Commit #2659 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/2659/ ) Revert HDFS-3837 . Fix DataNode.recoverBlock findbugs warning. (Revision 1376701) Result = FAILURE eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1376701 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/DatanodeRegistration.java
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Hdfs-trunk #1144 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1144/)
          Revert HDFS-3837. Fix DataNode.recoverBlock findbugs warning. (Revision 1376701)

          Result = FAILURE
          eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1376701
          Files :

          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/DatanodeRegistration.java
          Show
          Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #1144 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1144/ ) Revert HDFS-3837 . Fix DataNode.recoverBlock findbugs warning. (Revision 1376701) Result = FAILURE eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1376701 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/DatanodeRegistration.java
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Mapreduce-trunk #1175 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1175/)
          Revert HDFS-3837. Fix DataNode.recoverBlock findbugs warning. (Revision 1376701)
          HDFS-3837. Fix DataNode.recoverBlock findbugs warning. Contributed by Eli Collins (Revision 1376129)

          Result = FAILURE
          eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1376701
          Files :

          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/DatanodeRegistration.java

          eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1376129
          Files :

          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/DatanodeRegistration.java
          Show
          Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #1175 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1175/ ) Revert HDFS-3837 . Fix DataNode.recoverBlock findbugs warning. (Revision 1376701) HDFS-3837 . Fix DataNode.recoverBlock findbugs warning. Contributed by Eli Collins (Revision 1376129) Result = FAILURE eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1376701 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/DatanodeRegistration.java eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1376129 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/DatanodeRegistration.java
          Hide
          Eli Collins added a comment -

          Patch attached.

          • Casts the registration to DatanodeID to avoid the warning wrt equals
          • Adds an equals javadoc
          • Adds comments equals and hash methods that override DataNodeID and call back to be more explicit
          Show
          Eli Collins added a comment - Patch attached. Casts the registration to DatanodeID to avoid the warning wrt equals Adds an equals javadoc Adds comments equals and hash methods that override DataNodeID and call back to be more explicit
          Hide
          Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12542333/hdfs-3837.txt
          against trunk revision .

          +1 @author. The patch does not contain any @author tags.

          -1 tests included. 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 javac. The applied patch does not increase the total number of javac compiler warnings.

          +1 javadoc. The javadoc tool did not generate any warning messages.

          +1 eclipse:eclipse. The patch built with eclipse:eclipse.

          -1 findbugs. The patch appears to introduce 1 new Findbugs (version 1.3.9) warnings.

          +1 release audit. The applied patch does not increase the total number of release audit warnings.

          -1 core tests. The patch failed these unit tests in hadoop-hdfs-project/hadoop-hdfs:

          org.apache.hadoop.hdfs.TestHftpDelegationToken

          +1 contrib tests. The patch passed contrib unit tests.

          Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/3092//testReport/
          Findbugs warnings: https://builds.apache.org/job/PreCommit-HDFS-Build/3092//artifact/trunk/patchprocess/newPatchFindbugsWarningshadoop-hdfs.html
          Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/3092//console

          This message is automatically generated.

          Show
          Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12542333/hdfs-3837.txt against trunk revision . +1 @author. The patch does not contain any @author tags. -1 tests included. 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 javac. The applied patch does not increase the total number of javac compiler warnings. +1 javadoc. The javadoc tool did not generate any warning messages. +1 eclipse:eclipse. The patch built with eclipse:eclipse. -1 findbugs. The patch appears to introduce 1 new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed these unit tests in hadoop-hdfs-project/hadoop-hdfs: org.apache.hadoop.hdfs.TestHftpDelegationToken +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/3092//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HDFS-Build/3092//artifact/trunk/patchprocess/newPatchFindbugsWarningshadoop-hdfs.html Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/3092//console This message is automatically generated.
          Hide
          Suresh Srinivas added a comment -

          Seems to me the findbugs is not fixed by the new patch or is it Jenkins error.

          Fixing this issue quickly will help. Currently all Jenkins reports have findbugs -1 for precommit tests.

          Call to equals() comparing different types in 
          org.apache.hadoop.hdfs.server.datanode.DataNode.recoverBlock(BlockRecoveryCommand$RecoveringBlock)
          Bug type EC_UNRELATED_TYPES (click for details) 
          In class org.apache.hadoop.hdfs.server.datanode.DataNode
          In method org.apache.hadoop.hdfs.server.datanode.DataNode.recoverBlock(BlockRecoveryCommand$RecoveringBlock)
          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 DataNode.java:[line 1869]
          
          Show
          Suresh Srinivas added a comment - Seems to me the findbugs is not fixed by the new patch or is it Jenkins error. Fixing this issue quickly will help. Currently all Jenkins reports have findbugs -1 for precommit tests. Call to equals() comparing different types in org.apache.hadoop.hdfs.server.datanode.DataNode.recoverBlock(BlockRecoveryCommand$RecoveringBlock) Bug type EC_UNRELATED_TYPES (click for details) In class org.apache.hadoop.hdfs.server.datanode.DataNode In method org.apache.hadoop.hdfs.server.datanode.DataNode.recoverBlock(BlockRecoveryCommand$RecoveringBlock) 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 DataNode.java:[line 1869]
          Hide
          Eli Collins added a comment -

          The findbugs warning seems bogus - "This method calls equals(Object) on two references of different class types with no common subclasses. Therefore, the objects being compared are unlikely to be members of the same class at runtime". Both DatanodeInfo and DatanodeRegistration extend DatanodeID so they both share the equals implementation.

          Anyway, I'll put the relevant code back (cast the array) since this fixes the findbugs warning is is fine (just more verbose).

          -    DatanodeID[] datanodeids = rBlock.getLocations();
          +    DatanodeInfo[] targets = rBlock.getLocations();
          +    DatanodeID[] datanodeids = (DatanodeID[])targets;
          

          Updated patch, includes the comments as well so it's clear both classes are using the same equals method.

          Show
          Eli Collins added a comment - The findbugs warning seems bogus - "This method calls equals(Object) on two references of different class types with no common subclasses. Therefore, the objects being compared are unlikely to be members of the same class at runtime". Both DatanodeInfo and DatanodeRegistration extend DatanodeID so they both share the equals implementation. Anyway, I'll put the relevant code back (cast the array) since this fixes the findbugs warning is is fine (just more verbose). - DatanodeID[] datanodeids = rBlock.getLocations(); + DatanodeInfo[] targets = rBlock.getLocations(); + DatanodeID[] datanodeids = (DatanodeID[])targets; Updated patch, includes the comments as well so it's clear both classes are using the same equals method.
          Hide
          Suresh Srinivas added a comment -

          If this is a findbugs issue, why not just add this to findbugs exclude?

          Show
          Suresh Srinivas added a comment - If this is a findbugs issue, why not just add this to findbugs exclude?
          Hide
          Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12542780/hdfs-3837.txt
          against trunk revision .

          +1 @author. The patch does not contain any @author tags.

          -1 tests included. 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 javac. The applied patch does not increase the total number of javac compiler warnings.

          +1 javadoc. The javadoc tool did not generate any warning messages.

          +1 eclipse:eclipse. The patch built with eclipse:eclipse.

          +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

          +1 release audit. The applied patch does not increase the total number of release audit warnings.

          -1 core tests. The patch failed these unit tests in hadoop-hdfs-project/hadoop-hdfs:

          org.apache.hadoop.hdfs.TestHftpDelegationToken
          org.apache.hadoop.hdfs.server.namenode.metrics.TestNameNodeMetrics

          +1 contrib tests. The patch passed contrib unit tests.

          Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/3108//testReport/
          Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/3108//console

          This message is automatically generated.

          Show
          Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12542780/hdfs-3837.txt against trunk revision . +1 @author. The patch does not contain any @author tags. -1 tests included. 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 javac. The applied patch does not increase the total number of javac compiler warnings. +1 javadoc. The javadoc tool did not generate any warning messages. +1 eclipse:eclipse. The patch built with eclipse:eclipse. +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed these unit tests in hadoop-hdfs-project/hadoop-hdfs: org.apache.hadoop.hdfs.TestHftpDelegationToken org.apache.hadoop.hdfs.server.namenode.metrics.TestNameNodeMetrics +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/3108//testReport/ Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/3108//console This message is automatically generated.
          Hide
          Eli Collins added a comment -

          I investigated some more and confirmed findbugs isn't searching back far enough for the common subclass. Eg if I swap variables in the equals call I get:

          org.apache.hadoop.hdfs.protocol.DatanodeInfo.equals(Object) used to determine equality
          org.apache.hadoop.hdfs.server.common.JspHelper$NodeRecord.equals(Object) used to determine equality
          org.apache.hadoop.hdfs.server.blockmanagement.DatanodeDescriptor.equals(Object) used to determine equality
          At DataNode.java:[line 1871]
          

          It stops at DatanodeDescriptor#equals even though this calls super.equals (DatanodeInfo) which calls super.equals (DatanodeID). Just like the current warning stops at DatanodeRegistration#equals which calls super.equals (DatanodeID).

          It would be better (and findbugs wouldn't choke) if the various classes that extend DatanodeID have a member instead. I looked at this for HDFS-3237 and it required a ton of changes that probably aren't worth it.

          Given this I'll update the patch per your suggestion Surresh to ignore the warning in DataNode#recoverBlock.

          Show
          Eli Collins added a comment - I investigated some more and confirmed findbugs isn't searching back far enough for the common subclass. Eg if I swap variables in the equals call I get: org.apache.hadoop.hdfs.protocol.DatanodeInfo.equals(Object) used to determine equality org.apache.hadoop.hdfs.server.common.JspHelper$NodeRecord.equals(Object) used to determine equality org.apache.hadoop.hdfs.server.blockmanagement.DatanodeDescriptor.equals(Object) used to determine equality At DataNode.java:[line 1871] It stops at DatanodeDescriptor#equals even though this calls super.equals (DatanodeInfo) which calls super.equals (DatanodeID). Just like the current warning stops at DatanodeRegistration#equals which calls super.equals (DatanodeID). It would be better (and findbugs wouldn't choke) if the various classes that extend DatanodeID have a member instead. I looked at this for HDFS-3237 and it required a ton of changes that probably aren't worth it. Given this I'll update the patch per your suggestion Surresh to ignore the warning in DataNode#recoverBlock.
          Hide
          Eli Collins added a comment -

          Updated patch attached.

          Show
          Eli Collins added a comment - Updated patch attached.
          Hide
          Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12542897/hdfs-3837.txt
          against trunk revision .

          +1 @author. The patch does not contain any @author tags.

          -1 tests included. 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 javac. The applied patch does not increase the total number of javac compiler warnings.

          +1 javadoc. The javadoc tool did not generate any warning messages.

          +1 eclipse:eclipse. The patch built with eclipse:eclipse.

          +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

          +1 release audit. The applied patch does not increase the total number of release audit warnings.

          -1 core tests. The patch failed these unit tests in hadoop-hdfs-project/hadoop-hdfs:

          org.apache.hadoop.hdfs.TestHftpDelegationToken
          org.apache.hadoop.hdfs.server.namenode.metrics.TestNameNodeMetrics
          org.apache.hadoop.hdfs.web.TestWebHDFS
          org.apache.hadoop.hdfs.TestPersistBlocks

          +1 contrib tests. The patch passed contrib unit tests.

          Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/3117//testReport/
          Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/3117//console

          This message is automatically generated.

          Show
          Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12542897/hdfs-3837.txt against trunk revision . +1 @author. The patch does not contain any @author tags. -1 tests included. 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 javac. The applied patch does not increase the total number of javac compiler warnings. +1 javadoc. The javadoc tool did not generate any warning messages. +1 eclipse:eclipse. The patch built with eclipse:eclipse. +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed these unit tests in hadoop-hdfs-project/hadoop-hdfs: org.apache.hadoop.hdfs.TestHftpDelegationToken org.apache.hadoop.hdfs.server.namenode.metrics.TestNameNodeMetrics org.apache.hadoop.hdfs.web.TestWebHDFS org.apache.hadoop.hdfs.TestPersistBlocks +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/3117//testReport/ Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/3117//console This message is automatically generated.
          Hide
          Suresh Srinivas added a comment -

          Other than findbugs exclude, rest of the changes do not seem necessary or adds value. My preference is to undo it. However I do not feel strongly about this.

          +1 for the patch.

          Show
          Suresh Srinivas added a comment - Other than findbugs exclude, rest of the changes do not seem necessary or adds value. My preference is to undo it. However I do not feel strongly about this. +1 for the patch.
          Hide
          Eli Collins added a comment -

          No problem, can always do cleanup in another change. Updated patch just does adds an exclude.

          Thanks for the reviews Suresh.

          Show
          Eli Collins added a comment - No problem, can always do cleanup in another change. Updated patch just does adds an exclude. Thanks for the reviews Suresh.
          Hide
          Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12543132/hdfs-3837.txt
          against trunk revision .

          +1 @author. The patch does not contain any @author tags.

          -1 tests included. 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 javac. The applied patch does not increase the total number of javac compiler warnings.

          +1 javadoc. The javadoc tool did not generate any warning messages.

          +1 eclipse:eclipse. The patch built with eclipse:eclipse.

          +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

          +1 release audit. The applied patch does not increase the total number of release audit warnings.

          -1 core tests. The patch failed these unit tests in hadoop-hdfs-project/hadoop-hdfs:

          org.apache.hadoop.hdfs.server.blockmanagement.TestBlocksWithNotEnoughRacks
          org.apache.hadoop.hdfs.TestHftpDelegationToken

          +1 contrib tests. The patch passed contrib unit tests.

          Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/3125//testReport/
          Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/3125//console

          This message is automatically generated.

          Show
          Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12543132/hdfs-3837.txt against trunk revision . +1 @author. The patch does not contain any @author tags. -1 tests included. 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 javac. The applied patch does not increase the total number of javac compiler warnings. +1 javadoc. The javadoc tool did not generate any warning messages. +1 eclipse:eclipse. The patch built with eclipse:eclipse. +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed these unit tests in hadoop-hdfs-project/hadoop-hdfs: org.apache.hadoop.hdfs.server.blockmanagement.TestBlocksWithNotEnoughRacks org.apache.hadoop.hdfs.TestHftpDelegationToken +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/3125//testReport/ Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/3125//console This message is automatically generated.
          Hide
          Eli Collins added a comment -

          I've committed this and merged to branch-2.

          Show
          Eli Collins added a comment - I've committed this and merged to branch-2.
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Hdfs-trunk #1151 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1151/)
          HDFS-3837. Fix DataNode.recoverBlock findbugs warning. Contributed by Eli Collins (Revision 1379172)

          Result = FAILURE
          eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1379172
          Files :

          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/dev-support/findbugsExcludeFile.xml
          Show
          Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #1151 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1151/ ) HDFS-3837 . Fix DataNode.recoverBlock findbugs warning. Contributed by Eli Collins (Revision 1379172) Result = FAILURE eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1379172 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/dev-support/findbugsExcludeFile.xml
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Mapreduce-trunk #1182 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1182/)
          HDFS-3837. Fix DataNode.recoverBlock findbugs warning. Contributed by Eli Collins (Revision 1379172)

          Result = SUCCESS
          eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1379172
          Files :

          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/dev-support/findbugsExcludeFile.xml
          Show
          Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #1182 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1182/ ) HDFS-3837 . Fix DataNode.recoverBlock findbugs warning. Contributed by Eli Collins (Revision 1379172) Result = SUCCESS eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1379172 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/dev-support/findbugsExcludeFile.xml

            People

            • Assignee:
              Eli Collins
              Reporter:
              Eli Collins
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development