hadoop-mapreduce-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MAPREDUCE-6063) In sortAndSpill of MapTask.java, size is calculated wrongly when bufend < bufstart.
Date Thu, 04 Sep 2014 13:44:55 GMT

    [ https://issues.apache.org/jira/browse/MAPREDUCE-6063?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14121356#comment-14121356
] 

Hudson commented on MAPREDUCE-6063:
-----------------------------------

FAILURE: Integrated in Hadoop-Hdfs-trunk #1861 (See [https://builds.apache.org/job/Hadoop-Hdfs-trunk/1861/])
MAPREDUCE-6063. Correct spill size calculation for spills wrapping the circular buffer. Contributed
by zhihai xu. (cdouglas: rev a18424e724982d01e0191ca7db713da1d43d1e4d)
* hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/MapTask.java
* hadoop-mapreduce-project/CHANGES.txt


> In sortAndSpill of MapTask.java, size is calculated wrongly when bufend < bufstart.
> -----------------------------------------------------------------------------------
>
>                 Key: MAPREDUCE-6063
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-6063
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>          Components: mrv1, mrv2
>            Reporter: zhihai xu
>            Assignee: zhihai xu
>             Fix For: 3.0.0, 2.6.0
>
>         Attachments: MAPREDUCE-6063.000.patch, MAPREDUCE-6063.branch-1.patch
>
>
> In sortAndSpill of MapTask.java, size is calculated wrongly when bufend < bufstart.
 we should change (bufvoid - bufend) + bufstart to (bufvoid - bufstart) + bufend.
> Should change
> {code}
>      long size = (bufend >= bufstart
>           ? bufend - bufstart
>           : (bufvoid - bufend) + bufstart) +
>                   partitions * APPROX_HEADER_LENGTH;
> {code}
> to:
> {code}
>      long size = (bufend >= bufstart
>           ? bufend - bufstart
>           : (bufvoid - bufstart) + bufend) +
>                   partitions * APPROX_HEADER_LENGTH;
> {code}
> It is because when wraparound happen (bufend < bufstart) ,  the size should 
> bufvoid - bufstart (bigger one) + bufend(small one).
> You can find similar code implementation in MapTask.java:
> {code}
>         mapOutputByteCounter.increment(valend >= keystart
>             ? valend - keystart
>             : (bufvoid - keystart) + valend);
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message