Hi Everyone, Does anyone know why call() function being called *3 times* for each message arrive
JavaDStream<String> message = messagesDStream.map(new >> Function<Tuple2<String, String>, String>() { > > @Override > > public String call(Tuple2<String, String> tuple2) { > > return tuple2._2(); > > } > > }); > > >> > > message.foreachRDD(rdd -> { > > logger.debug("---> New RDD with " + rdd.partitions().size() + " partitions >> and " + rdd.count() + " records"); *<== 1* > > SQLContext sqlContext = new SQLContext(rdd.context()); > > >> JavaRDD<JavaBean> rowRDD = rdd.map(new Function<String, JavaBean>() { > > public JavaBean call(String record) { >> *<== being called 3 times* > > What I tried: * *cache()* * cleaning up *checkpoint dir* Thanks, Kevin.