package es.tid.cosmos.mobility.activityarea;

import java.io.IOException;

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

import es.tid.cosmos.mobility.data.MobProtocol.ActivityArea;
import es.tid.cosmos.mobility.data.MobProtocol.ActivityAreaKey;
import es.tid.cosmos.mobility.data.MobProtocol.Cell;

/**
 *
 * @author losa
 */
public class  FusionTotalVarsReducer extends Reducer<
        ProtobufWritable<ActivityAreaKey>, ProtobufWritable<ActivityArea>,
        ProtobufWritable<ActivityAreaKey>, ProtobufWritable<Cell>> {
    @Override
    protected void reduce(ProtobufWritable<ActivityAreaKey> key,
            Iterable<ProtobufWritable<ActivityArea>> values, Context context)
            throws IOException, InterruptedException {
    }
}

@@ -66,16 +66,67 @@
 ception;
+%0Aimport java.util.List;%0Aimport java.util.ArrayList;
 %0A%0Aimport
@@ -446,17 +446,16 @@
 c class 
- 
 FusionTo
@@ -520,32 +520,40 @@
 ctivityAreaKey%3E,
+%0A       
  ProtobufWritabl
@@ -611,17 +611,30 @@
 reaKey%3E,
- 
+%0A        List%3C
 Protobuf
@@ -646,16 +646,85 @@
 ble%3C
-Cell%3E%3E %7B
+ActivityArea%3E%3E%3E %7B%0A    private List%3CProtobufWritable%3CActivityArea%3E%3E allAreas;%0A
 %0A   
@@ -932,16 +932,232 @@
 ption %7B%0A
+        this.allAreas = new ArrayList%3CProtobufWritable%3CActivityArea%3E%3E();%0A        for (ProtobufWritable%3CActivityArea%3E value : values) %7B%0A            allAreas.add(value);%0A        %7D%0A        context.write(key, allAreas);%0A
     %7D%0A%7D%0A

Write fusion Reducer as additions to List