hadoop-mapreduce-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doug Cutting (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MAPREDUCE-4827) Increase hash quality of HashPartitioner
Date Thu, 29 Nov 2012 00:03:58 GMT

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

Doug Cutting commented on MAPREDUCE-4827:
-----------------------------------------

> Most writables do not implement hashCode()

All WritableComparable (i.e., key) implementations included with Hadoop implement hashCode().
 Moreover a WritableComparable would be a poor key implementation if it did not implement
hashCode() and was used with HashPartitioner since it wouldn't send equivalent values at the
same reducer.  The WritableComparable documentation specifically advises implementing hashCode().

http://hadoop.apache.org/docs/current/api/org/apache/hadoop/io/WritableComparable.html
                
> Increase hash quality of HashPartitioner
> ----------------------------------------
>
>                 Key: MAPREDUCE-4827
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-4827
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>            Reporter: Radim Kolar
>         Attachments: betterhash1.txt
>
>
> hash partitioner is using object.hashCode() for splitting keys into partitions. This
results in bad distributions because hashCode() quality is poor. 
> These hashCode() functions are sometimes written by hand (very poor quality) and sometimes
generated from by commons lang code (poor quality). Applying some transformation on top of
hashCode() provides better distribution.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message