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

The efficient comparators aren't always used except for BytesWritable and Text

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.20.0
    • 0.20.3, 0.21.0
    • None
    • None
    • Reviewed

    Description

      When we moved from Java 4 to Java 5 (and then 6), there was a change in the JVM semantics such that references to a class such as IntWritable.class no longer forces initialization. Since all of the Writables depend on their class static blocks to register their fast comparators, that can happen after we look up the comparator. In that case, the framework will fall back to the generic comparator that deserializes both keys and does the object compare, which may cause a huge slow down in the sort.

      Attachments

        1. HADOOP-6881.patch
          3 kB
          Doug Cutting
        2. HADOOP-6881.patch
          3 kB
          Doug Cutting
        3. h-6881.patch
          2 kB
          Owen O'Malley

        Activity

          omalley Owen O'Malley added a comment -

          This patch does two things:
          1. If a comparator is not defined, forces the class to be initialized by the class loader.
          2. cache the comparator so that we reuse the comparator even if it is the generic one.

          omalley Owen O'Malley added a comment - This patch does two things: 1. If a comparator is not defined, forces the class to be initialized by the class loader. 2. cache the comparator so that we reuse the comparator even if it is the generic one.
          cutting Doug Cutting added a comment -

          Here's a version of the patch that adds a unit test. This test fails for me without the patch.

          cutting Doug Cutting added a comment - Here's a version of the patch that adds a unit test. This test fails for me without the patch.
          cutting Doug Cutting added a comment -

          Slightly cleaned up the test code.

          cutting Doug Cutting added a comment - Slightly cleaned up the test code.
          hadoopqa Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12450519/h-6881.patch
          against trunk revision 979387.

          +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 javadoc. The javadoc tool appears to have generated 1 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 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 contrib tests. The patch passed contrib unit tests.

          Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/634/testReport/
          Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/634/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
          Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/634/artifact/trunk/build/test/checkstyle-errors.html
          Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/634/console

          This message is automatically generated.

          hadoopqa Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12450519/h-6881.patch against trunk revision 979387. +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 javadoc. The javadoc tool appears to have generated 1 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 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 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/634/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/634/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/634/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/634/console This message is automatically generated.
          cutting Doug Cutting added a comment -

          Get Hudson to try the test I added.

          The javadoc warnings all seem unrelated, but rather are about use of proprietary Sun APIs and cannot be supressed.

          http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6476630

          cutting Doug Cutting added a comment - Get Hudson to try the test I added. The javadoc warnings all seem unrelated, but rather are about use of proprietary Sun APIs and cannot be supressed. http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6476630
          hadoopqa Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12450525/HADOOP-6881.patch
          against trunk revision 979387.

          +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 appears to have generated 1 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 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 contrib tests. The patch passed contrib unit tests.

          Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/636/testReport/
          Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/636/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
          Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/636/artifact/trunk/build/test/checkstyle-errors.html
          Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/636/console

          This message is automatically generated.

          hadoopqa Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12450525/HADOOP-6881.patch against trunk revision 979387. +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 appears to have generated 1 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 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 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/636/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/636/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/636/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/636/console This message is automatically generated.
          cutting Doug Cutting added a comment -

          I just committed this. Thanks, Owen!

          cutting Doug Cutting added a comment - I just committed this. Thanks, Owen!
          cutting Doug Cutting added a comment -

          Patch merged to both 0.20 and 0.21 branches.

          cutting Doug Cutting added a comment - Patch merged to both 0.20 and 0.21 branches.

          People

            omalley Owen O'Malley
            omalley Owen O'Malley
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: