package es.tid.cosmos.mobility.clientlabelling;

import java.io.IOException;

import com.twitter.elephantbird.mapreduce.io.ProtobufWritable;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Reducer;

import es.tid.cosmos.mobility.data.ClusterUtil;
import es.tid.cosmos.mobility.data.MobProtocol.Cluster;

/**
 *
 * @author dmicol
 */
public class ExportClusterClientMinDistanceToTextReducer extends Reducer<
        LongWritable, ProtobufWritable<Cluster>, NullWritable, Text> {
    @Override
    protected void reduce(LongWritable key,
            Iterable<ProtobufWritable<Cluster>> values, Context context)
            throws IOException, InterruptedException {
        for (ProtobufWritable<Cluster> value : values) {
            final Cluster cluster = value.get();
            context.write(NullWritable.get(),
                          new Text(ClusterUtil.toString(cluster)));
        }
    }
}

@@ -819,16 +819,63 @@
 lues) %7B%0A
+            value.setConverter(Cluster.class);%0A
         
@@ -996,16 +996,69 @@
 ew Text(
+key.get() + %22%7C%22%0A                                   + 
 ClusterU

Add missing setConverter call.