You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-issues@hadoop.apache.org by "Harsh J (JIRA)" <ji...@apache.org> on 2012/08/22 15:47:42 UTC
[jira] [Assigned] (MAPREDUCE-4574) Fix TotalOrderParitioner to work
with non-WritableComparable key types
[ https://issues.apache.org/jira/browse/MAPREDUCE-4574?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Harsh J reassigned MAPREDUCE-4574:
----------------------------------
Assignee: Harsh J
> Fix TotalOrderParitioner to work with non-WritableComparable key types
> ----------------------------------------------------------------------
>
> Key: MAPREDUCE-4574
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-4574
> Project: Hadoop Map/Reduce
> Issue Type: Bug
> Components: client
> Affects Versions: 2.0.0-alpha
> Reporter: Harsh J
> Assignee: Harsh J
>
> The current TotalOrderPartitioner class will not work with an alternative serialization library such as Avro.
> To make it work, we may edit the readPartitions bits in it to support non-WritableComparable keys and also remove the WritableComparable check in the class types definition.
> That is, since we do not use the values at all (NullWritable), we may as well do:
> {code}
> private K[] readPartitions(FileSystem fs, Path p, Class<K> keyClass,
> Configuration conf) throws IOException {
> …
> while ((key = (K) reader.next(key)) != null) {
> parts.add(key);
> key = ReflectionUtils.newInstance(keyClass, conf);
> }
> …
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira