//JavaPairRDD data = sc.newAPIHadoopRDD(hdpConf, EsInputFormat.class, NullWritable.class, MapWritable.class);
JavaPairRDD data = sc.hadoopRDD(hdpConf, EsInputFormat.class, NullWritable.class, MapWritable.class);
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 {