How can I have my mapper output a HashMap as the value in the
OutputCollector (so my reducer can work directly on the HashMap key/value
pairs)? I tried just setting things up as HashMap in
conf.setOutputValueClass(HashMap.class), but that didn't work. What do I
need to change to allow another type (hashmap or arraylist) to be the output
of the map method?
public static class Map extends MapReduceBase implements
Mapper<LongWritable, Text, Text, HashMap> {
...
public void map(LongWritable key, Text value, OutputCollector<Text,
HashMap> output, Reporter reporter) throws IOException {
...
output.collect(new Text("hello"), myHash);
...