hadoop-mapreduce-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ed Mazur (JIRA)" <j...@apache.org>
Subject [jira] Commented: (MAPREDUCE-1287) HashPartitioner calls hashCode() when there is only 1 reducer
Date Fri, 11 Dec 2009 14:20:18 GMT

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

Ed Mazur commented on MAPREDUCE-1287:

I haven't ran this, but here's a quick analysis:

- Cost: (_number of map output pairs_)*(_cost of "reducers == 1" check_)
- Gain: (_number of map output pairs_)*(_cost of key's hashCode()_), but only in the case
of 1 reducer (no gain otherwise)

Your suggestion of moving this into the framework makes a lot of sense. That way you only
have to check for the 1 reducer case when you assign the partitioner and not for every map
output, essentially eliminating the cost of the optimization.

> HashPartitioner calls hashCode() when there is only 1 reducer
> -------------------------------------------------------------
>                 Key: MAPREDUCE-1287
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1287
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>    Affects Versions: 0.22.0
>            Reporter: Ed Mazur
>            Assignee: Ed Mazur
>            Priority: Minor
>             Fix For: 0.22.0
>         Attachments: MAPREDUCE-1287.2.patch, MAPREDUCE-1287.3.patch, MAPREDUCE-1287.patch
> HashPartitioner could be optimized to not call the key's hashCode() if there is only
1 reducer.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message