How do I serialize a MapWritable value?

2011-04-18 Thread W.P. McNeill
I have a reducer that outputs pairs of the form . The MapWritable is a map from Text to Long. The key and output values of my reducer are declared like so: job.setOutputKeyClass(Text.class); job.setOutputValueClass(MapWritable.class); The last few lines of my reducer look like this:

Re: How do I serialize a MapWritable value?

2011-04-19 Thread Marcos M Rubinelli
MapWritable works if you use a binary format like SequenceFileOutputFormat. If you need a plain text output, you can use a library like Jackson to generate a string representation -- or look for a custom OutputFormat that already does that for you. I have a reducer that outputs pairs of the for