}
@Override
public void onReceive(Object message) throws Exception {
if (message instanceof MapData) {
MapData mapData = (MapData) message;
// reduce the incoming data
ReduceData reduceData = reduce(mapData.getDataList());
// forward the result to aggregate actor
aggregateActor.tell(reduceData);
} else
unhandled(message);
}