[
https://issues.apache.org/jira/browse/MAPREDUCE-2816?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eli Collins moved HADOOP-5028 to MAPREDUCE-2816:
------------------------------------------------
Affects Version/s: (was: 0.19.0)
Key: MAPREDUCE-2816 (was: HADOOP-5028)
Project: Hadoop Map/Reduce (was: Hadoop Common)
> SortedMapWritable: inkonsistent put() and putAll() behaviour
> ------------------------------------------------------------
>
> Key: MAPREDUCE-2816
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-2816
> Project: Hadoop Map/Reduce
> Issue Type: Bug
> Reporter: Stefan Podkowinski
>
> The current SortedMapWritable implementation is breaking support for custom
> classes in case putAll() is used. Its important for putAll() that addToMap()
> will called to register all used classes. Please consider to have putAll()
> call put() for each map entry.
> trunk:
> public Writable put(WritableComparable key, Writable value) {
> addToMap(key.getClass());
> addToMap(value.getClass());
> return instance.put(key, value);
> }
> public void putAll(Map<? extends WritableComparable, ? extends Writable> t)
> {
> for (Map.Entry<? extends WritableComparable, ? extends Writable> e:
> t.entrySet()) {
>
> instance.put(e.getKey(), e.getValue());
> }
> }
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira