Not able to persist the DStream for use in next batch
问题 JavaRDD<String> history_ = sc.emptyRDD(); java.util.Queue<JavaRDD<String> > queue = new LinkedList<JavaRDD<String>>(); queue.add(history_); JavaDStream<String> history_dstream = ssc.queueStream(queue); JavaPairDStream<String,ArrayList<String>> history = history_dstream.mapToPair(r -> { return new Tuple2< String,ArrayList<String> >(null,null); }); JavaPairInputDStream<String, GenericData.Record> stream_1 = KafkaUtils.createDirectStream(ssc, String.class, GenericData.Record.class, StringDecoder