Why do multiple print() methods in Spark Streaming affect the values in my list?
问题 I'm trying to receive one JSON line per two seconds, store them in a List which has elements from a costum Class, created by me, and print the resulting List after each execution of the context. So I'm doing something like this: JavaStreamingContext ssc = new JavaStreamingContext(sparkConf, Durations.seconds(2)); JavaReceiverInputDStream<String> streamData = ssc.socketTextStream(args[0], Integer.parseInt(args[1]), StorageLevels.MEMORY_AND_DISK_SER); JavaDStream<LinkedList<StreamValue>>