Hadoop Common
  1. Hadoop Common
  2. HADOOP-3475

MapOutputBuffer allocates 4x as much space to record capacity as intended

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.17.0
    • Fix Version/s: 0.17.1
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      When setting up its accounting tables, MapTask.MapOutputBuffer calculates the size of each of its buffers as:

      Where #total_bytes is $io.sort.mb * 2^20 and #accounting_bytes is $io.sort.record.percent * #total_bytes
      kvbuffer: #total_bytes - #accounting_bytes
      kvoffsets: 1/4 of #accounting_bytes
      kvindices: 3/4 of #accounting_bytes
      

      kvoffsets and kvindices are ints, not bytes; the size of both arrays is incorrectly calculated.

      1. 3475-1.patch
        1 kB
        Chris Douglas
      2. 3475-2.patch
        1 kB
        Chris Douglas

        Issue Links

          Activity

          Chris Douglas created issue -
          Hide
          Chris Douglas added a comment - - edited

          Corrects accounting and puts allocations in terms of #bytes required per record. No unit tests are included, as allocations internal to MapOutputBuffer aren't easily queried or observed.

          Show
          Chris Douglas added a comment - - edited Corrects accounting and puts allocations in terms of #bytes required per record. No unit tests are included, as allocations internal to MapOutputBuffer aren't easily queried or observed.
          Chris Douglas made changes -
          Field Original Value New Value
          Attachment 3475-0.patch [ 12383157 ]
          Chris Douglas made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Hide
          Chris Douglas added a comment -

          Updated to include fewer embarrassing errors...

          Show
          Chris Douglas added a comment - Updated to include fewer embarrassing errors...
          Chris Douglas made changes -
          Attachment 3475-1.patch [ 12383158 ]
          Chris Douglas made changes -
          Attachment 3475-0.patch [ 12383157 ]
          Hide
          Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12383158/3475-1.patch
          against trunk revision 661918.

          +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 tests are needed for this patch.

          +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 warnings.

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

          -1 core tests. The patch failed core unit tests.

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

          Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2530/testReport/
          Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2530/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
          Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2530/artifact/trunk/build/test/checkstyle-errors.html
          Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2530/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/12383158/3475-1.patch against trunk revision 661918. +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 tests are needed for this patch. +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 warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2530/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2530/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2530/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2530/console This message is automatically generated.
          Hide
          Tsz Wo Nicholas Sze added a comment -

          To be consistent, (Integer.SIZE / 8) should be either (Integer.SIZE / Byte.SIZE) or just 4. Otherwise, patch looks good.

          Show
          Tsz Wo Nicholas Sze added a comment - To be consistent, (Integer.SIZE / 8) should be either (Integer.SIZE / Byte.SIZE) or just 4. Otherwise, patch looks good.
          Hide
          Chris Douglas added a comment -

          Incorporated Nicholas's feedback

          Show
          Chris Douglas added a comment - Incorporated Nicholas's feedback
          Chris Douglas made changes -
          Attachment 3475-2.patch [ 12383271 ]
          Hide
          Chris Douglas added a comment -

          I just committed this.

          Show
          Chris Douglas added a comment - I just committed this.
          Chris Douglas made changes -
          Resolution Fixed [ 1 ]
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Hadoop Flags [Reviewed]
          Hide
          Hudson added a comment -
          Show
          Hudson added a comment - Integrated in Hadoop-trunk #511 (See http://hudson.zones.apache.org/hudson/job/Hadoop-trunk/511/ )
          Hide
          Chris Douglas added a comment -

          Reopening this, as it is necessary for 0.17.1

          Show
          Chris Douglas added a comment - Reopening this, as it is necessary for 0.17.1
          Chris Douglas made changes -
          Status Resolved [ 5 ] Reopened [ 4 ]
          Resolution Fixed [ 1 ]
          Chris Douglas made changes -
          Fix Version/s 0.17.1 [ 12313190 ]
          Chris Douglas made changes -
          Link This issue blocks HADOOP-3550 [ HADOOP-3550 ]
          Hide
          Chris Douglas added a comment -

          I just committed this to the 0.17 branch.

          Show
          Chris Douglas added a comment - I just committed this to the 0.17 branch.
          Chris Douglas made changes -
          Resolution Fixed [ 1 ]
          Status Reopened [ 4 ] Resolved [ 5 ]
          Hide
          Hudson added a comment -
          Show
          Hudson added a comment - Integrated in Hadoop-trunk #523 (See http://hudson.zones.apache.org/hudson/job/Hadoop-trunk/523/ )
          Nigel Daley made changes -
          Fix Version/s 0.18.0 [ 12312972 ]
          Gavin made changes -
          Link This issue blocks HADOOP-3550 [ HADOOP-3550 ]
          Gavin made changes -
          Link This issue is depended upon by HADOOP-3550 [ HADOOP-3550 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Patch Available Patch Available
          1h 9m 1 Chris Douglas 31/May/08 00:49
          Patch Available Patch Available Resolved Resolved
          3d 4h 8m 1 Chris Douglas 03/Jun/08 04:57
          Resolved Resolved Reopened Reopened
          14d 18h 34m 1 Chris Douglas 17/Jun/08 23:31
          Reopened Reopened Resolved Resolved
          7m 31s 1 Chris Douglas 17/Jun/08 23:39

            People

            • Assignee:
              Chris Douglas
              Reporter:
              Chris Douglas
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development