long messages = data.filter(new Function<Tuple2<Text, MapWritable>, Boolean>() {
public Boolean call(Tuple2<Text, MapWritable> t) { return t._2.containsKey(new Text("message")); }
}).count();
JavaRDD map = data.map(new Function<Tuple2<Text, MapWritable>, Map<String, Object>>() {
public Map<String, Object> call(Tuple2<Text, MapWritable> v1) throws Exception {
return (Map<String, Object>) WritableUtils.fromWritable(v1._2);
}
});