Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-2969

ExtendedBlock.equals is incorrectly implemented

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 0.23.0
    • Fix Version/s: 0.23.2
    • Component/s: datanode
    • Labels:
      None

      Description

      The ExtendedBlock.equals method incorrectly returns true for any two blocks in the same block pool, regardless of block ID.

      1. hdfs-2969.txt
        3 kB
        Todd Lipcon

        Issue Links

          Activity

          Hide
          Todd Lipcon added a comment -

          Following code is obviously wrong:

              ExtendedBlock b = (ExtendedBlock)o;
              return b.block.equals(block) || b.poolId.equals(poolId);
          
          Show
          Todd Lipcon added a comment - Following code is obviously wrong: ExtendedBlock b = (ExtendedBlock)o; return b.block.equals(block) || b.poolId.equals(poolId);
          Hide
          Todd Lipcon added a comment -

          Attached patch has a unit test and fix

          Show
          Todd Lipcon added a comment - Attached patch has a unit test and fix
          Hide
          Hadoop QA added a comment -

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

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

          +1 tests included. The patch appears to include 2 new or modified tests.

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

          +1 javac. The applied patch does not increase the total number of javac compiler warnings.

          +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 passed unit tests in .

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

          Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/1880//testReport/
          Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/1880//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/12515017/hdfs-2969.txt against trunk revision . +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 2 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +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 passed unit tests in . +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/1880//testReport/ Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/1880//console This message is automatically generated.
          Hide
          Aaron T. Myers added a comment -

          +1, the patch looks good to me. Thanks, Todd.

          Show
          Aaron T. Myers added a comment - +1, the patch looks good to me. Thanks, Todd.
          Hide
          Todd Lipcon added a comment -

          Committed to 23 and trunk, thanks for reviewing, Aaron.

          Show
          Todd Lipcon added a comment - Committed to 23 and trunk, thanks for reviewing, Aaron.
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Hdfs-trunk-Commit #1821 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/1821/)
          HDFS-2969. ExtendedBlock.equals is incorrectly implemented. Contributed by Todd Lipcon. (Revision 1245830)

          Result = SUCCESS
          todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1245830
          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/protocol/ExtendedBlock.java
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/protocol/TestExtendedBlock.java
          Show
          Hudson added a comment - Integrated in Hadoop-Hdfs-trunk-Commit #1821 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/1821/ ) HDFS-2969 . ExtendedBlock.equals is incorrectly implemented. Contributed by Todd Lipcon. (Revision 1245830) Result = SUCCESS todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1245830 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/protocol/ExtendedBlock.java /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/protocol/TestExtendedBlock.java
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Hdfs-0.23-Commit #556 (See https://builds.apache.org/job/Hadoop-Hdfs-0.23-Commit/556/)
          HDFS-2969. ExtendedBlock.equals is incorrectly implemented. Contributed by Todd Lipcon. (Revision 1245829)

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

          • /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ExtendedBlock.java
          • /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/protocol/TestExtendedBlock.java
          Show
          Hudson added a comment - Integrated in Hadoop-Hdfs-0.23-Commit #556 (See https://builds.apache.org/job/Hadoop-Hdfs-0.23-Commit/556/ ) HDFS-2969 . ExtendedBlock.equals is incorrectly implemented. Contributed by Todd Lipcon. (Revision 1245829) Result = SUCCESS todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1245829 Files : /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ExtendedBlock.java /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/protocol/TestExtendedBlock.java
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Common-0.23-Commit #569 (See https://builds.apache.org/job/Hadoop-Common-0.23-Commit/569/)
          HDFS-2969. ExtendedBlock.equals is incorrectly implemented. Contributed by Todd Lipcon. (Revision 1245829)

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

          • /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ExtendedBlock.java
          • /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/protocol/TestExtendedBlock.java
          Show
          Hudson added a comment - Integrated in Hadoop-Common-0.23-Commit #569 (See https://builds.apache.org/job/Hadoop-Common-0.23-Commit/569/ ) HDFS-2969 . ExtendedBlock.equals is incorrectly implemented. Contributed by Todd Lipcon. (Revision 1245829) Result = SUCCESS todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1245829 Files : /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ExtendedBlock.java /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/protocol/TestExtendedBlock.java
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Common-trunk-Commit #1747 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/1747/)
          HDFS-2969. ExtendedBlock.equals is incorrectly implemented. Contributed by Todd Lipcon. (Revision 1245830)

          Result = SUCCESS
          todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1245830
          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/protocol/ExtendedBlock.java
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/protocol/TestExtendedBlock.java
          Show
          Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #1747 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/1747/ ) HDFS-2969 . ExtendedBlock.equals is incorrectly implemented. Contributed by Todd Lipcon. (Revision 1245830) Result = SUCCESS todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1245830 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/protocol/ExtendedBlock.java /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/protocol/TestExtendedBlock.java
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Mapreduce-trunk-Commit #1759 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/1759/)
          HDFS-2969. ExtendedBlock.equals is incorrectly implemented. Contributed by Todd Lipcon. (Revision 1245830)

          Result = ABORTED
          todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1245830
          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/protocol/ExtendedBlock.java
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/protocol/TestExtendedBlock.java
          Show
          Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk-Commit #1759 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/1759/ ) HDFS-2969 . ExtendedBlock.equals is incorrectly implemented. Contributed by Todd Lipcon. (Revision 1245830) Result = ABORTED todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1245830 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/protocol/ExtendedBlock.java /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/protocol/TestExtendedBlock.java
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Mapreduce-0.23-Commit #572 (See https://builds.apache.org/job/Hadoop-Mapreduce-0.23-Commit/572/)
          HDFS-2969. ExtendedBlock.equals is incorrectly implemented. Contributed by Todd Lipcon. (Revision 1245829)

          Result = ABORTED
          todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1245829
          Files :

          • /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ExtendedBlock.java
          • /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/protocol/TestExtendedBlock.java
          Show
          Hudson added a comment - Integrated in Hadoop-Mapreduce-0.23-Commit #572 (See https://builds.apache.org/job/Hadoop-Mapreduce-0.23-Commit/572/ ) HDFS-2969 . ExtendedBlock.equals is incorrectly implemented. Contributed by Todd Lipcon. (Revision 1245829) Result = ABORTED todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1245829 Files : /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ExtendedBlock.java /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/protocol/TestExtendedBlock.java
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Hdfs-trunk #959 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/959/)
          HDFS-2969. ExtendedBlock.equals is incorrectly implemented. Contributed by Todd Lipcon. (Revision 1245830)

          Result = SUCCESS
          todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1245830
          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/protocol/ExtendedBlock.java
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/protocol/TestExtendedBlock.java
          Show
          Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #959 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/959/ ) HDFS-2969 . ExtendedBlock.equals is incorrectly implemented. Contributed by Todd Lipcon. (Revision 1245830) Result = SUCCESS todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1245830 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/protocol/ExtendedBlock.java /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/protocol/TestExtendedBlock.java
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Hdfs-0.23-Build #172 (See https://builds.apache.org/job/Hadoop-Hdfs-0.23-Build/172/)
          HDFS-2969. ExtendedBlock.equals is incorrectly implemented. Contributed by Todd Lipcon. (Revision 1245829)

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

          • /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ExtendedBlock.java
          • /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/protocol/TestExtendedBlock.java
          Show
          Hudson added a comment - Integrated in Hadoop-Hdfs-0.23-Build #172 (See https://builds.apache.org/job/Hadoop-Hdfs-0.23-Build/172/ ) HDFS-2969 . ExtendedBlock.equals is incorrectly implemented. Contributed by Todd Lipcon. (Revision 1245829) Result = SUCCESS todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1245829 Files : /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ExtendedBlock.java /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/protocol/TestExtendedBlock.java
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Mapreduce-0.23-Build #200 (See https://builds.apache.org/job/Hadoop-Mapreduce-0.23-Build/200/)
          HDFS-2969. ExtendedBlock.equals is incorrectly implemented. Contributed by Todd Lipcon. (Revision 1245829)

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

          • /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ExtendedBlock.java
          • /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/protocol/TestExtendedBlock.java
          Show
          Hudson added a comment - Integrated in Hadoop-Mapreduce-0.23-Build #200 (See https://builds.apache.org/job/Hadoop-Mapreduce-0.23-Build/200/ ) HDFS-2969 . ExtendedBlock.equals is incorrectly implemented. Contributed by Todd Lipcon. (Revision 1245829) Result = FAILURE todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1245829 Files : /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ExtendedBlock.java /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/protocol/TestExtendedBlock.java
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Mapreduce-trunk #994 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/994/)
          HDFS-2969. ExtendedBlock.equals is incorrectly implemented. Contributed by Todd Lipcon. (Revision 1245830)

          Result = SUCCESS
          todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1245830
          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/protocol/ExtendedBlock.java
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/protocol/TestExtendedBlock.java
          Show
          Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #994 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/994/ ) HDFS-2969 . ExtendedBlock.equals is incorrectly implemented. Contributed by Todd Lipcon. (Revision 1245830) Result = SUCCESS todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1245830 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/protocol/ExtendedBlock.java /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/protocol/TestExtendedBlock.java

            People

            • Assignee:
              Todd Lipcon
              Reporter:
              Todd Lipcon
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development