Hadoop Common
  1. Hadoop Common
  2. HADOOP-7318

MD5Hash factory should reset the digester it returns

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 0.22.0
    • Fix Version/s: 0.22.0
    • Component/s: io
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Currently the getDigest() method in MD5Hash does not reset the digester it returns. Since it's a thread-local, this means that a previous aborted usage of the same digester could leave some state around. For example, if the secondary namenode receives an IOException while transfering the image, and does another image transfer with the same thread, it will think it has received an invalid digest.

      1. hadoop-7318.txt
        2 kB
        Todd Lipcon
      2. hadoop-7318.txt
        2 kB
        Todd Lipcon

        Activity

        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-trunk #697 (See https://builds.apache.org/hudson/job/Hadoop-Common-trunk/697/)
        HADOOP-7318. MD5Hash factory should reset the digester it returns. Contributed by Todd Lipcon

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

        • /hadoop/common/trunk/CHANGES.txt
        • /hadoop/common/trunk/src/test/core/org/apache/hadoop/io/TestMD5Hash.java
        • /hadoop/common/trunk/src/java/org/apache/hadoop/io/MD5Hash.java
        Show
        Hudson added a comment - Integrated in Hadoop-Common-trunk #697 (See https://builds.apache.org/hudson/job/Hadoop-Common-trunk/697/ ) HADOOP-7318 . MD5Hash factory should reset the digester it returns. Contributed by Todd Lipcon eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1126287 Files : /hadoop/common/trunk/CHANGES.txt /hadoop/common/trunk/src/test/core/org/apache/hadoop/io/TestMD5Hash.java /hadoop/common/trunk/src/java/org/apache/hadoop/io/MD5Hash.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-22-branch #55 (See https://builds.apache.org/hudson/job/Hadoop-Common-22-branch/55/)
        HADOOP-7318. svn merge -c 1126287 from trunk

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

        • /hadoop/common/branches/branch-0.22/src/test/core/org/apache/hadoop/io/TestMD5Hash.java
        • /hadoop/common/branches/branch-0.22/src/docs
        • /hadoop/common/branches/branch-0.22
        • /hadoop/common/branches/branch-0.22/src/java/org/apache/hadoop/io/MD5Hash.java
        • /hadoop/common/branches/branch-0.22/src/test/core
        • /hadoop/common/branches/branch-0.22/src/test/core/org/apache/hadoop/io/TestSequenceFile.java
        • /hadoop/common/branches/branch-0.22/CHANGES.txt
        • /hadoop/common/branches/branch-0.22/src/java
        Show
        Hudson added a comment - Integrated in Hadoop-Common-22-branch #55 (See https://builds.apache.org/hudson/job/Hadoop-Common-22-branch/55/ ) HADOOP-7318 . svn merge -c 1126287 from trunk eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1126288 Files : /hadoop/common/branches/branch-0.22/src/test/core/org/apache/hadoop/io/TestMD5Hash.java /hadoop/common/branches/branch-0.22/src/docs /hadoop/common/branches/branch-0.22 /hadoop/common/branches/branch-0.22/src/java/org/apache/hadoop/io/MD5Hash.java /hadoop/common/branches/branch-0.22/src/test/core /hadoop/common/branches/branch-0.22/src/test/core/org/apache/hadoop/io/TestSequenceFile.java /hadoop/common/branches/branch-0.22/CHANGES.txt /hadoop/common/branches/branch-0.22/src/java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-trunk-Commit #615 (See https://builds.apache.org/hudson/job/Hadoop-Common-trunk-Commit/615/)

        Show
        Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #615 (See https://builds.apache.org/hudson/job/Hadoop-Common-trunk-Commit/615/ )
        Hide
        Eli Collins added a comment -

        I've committed this to trunk and branch 22. Thanks Todd!

        Show
        Eli Collins added a comment - I've committed this to trunk and branch 22. Thanks Todd!
        Hide
        Hadoop QA added a comment -

        +1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12480018/hadoop-7318.txt
        against trunk revision 1125221.

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

        +1 tests included. The patch appears to include 3 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 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 core unit tests.

        +1 system test framework. The patch passed system test framework compile.

        Test results: https://builds.apache.org/hudson/job/PreCommit-HADOOP-Build/503//testReport/
        Findbugs warnings: https://builds.apache.org/hudson/job/PreCommit-HADOOP-Build/503//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Console output: https://builds.apache.org/hudson/job/PreCommit-HADOOP-Build/503//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/12480018/hadoop-7318.txt against trunk revision 1125221. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 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 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 core unit tests. +1 system test framework. The patch passed system test framework compile. Test results: https://builds.apache.org/hudson/job/PreCommit-HADOOP-Build/503//testReport/ Findbugs warnings: https://builds.apache.org/hudson/job/PreCommit-HADOOP-Build/503//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/hudson/job/PreCommit-HADOOP-Build/503//console This message is automatically generated.
        Hide
        Eli Collins added a comment -

        +1 good catch

        Show
        Eli Collins added a comment - +1 good catch
        Hide
        Todd Lipcon added a comment -

        oops, fixed test case to use constant throughout.

        Show
        Todd Lipcon added a comment - oops, fixed test case to use constant throughout.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development