我在火花中有2个dstream,我想首先加入2个流,然后在最后一个小时每5分钟计算一次加入的流
我试过了:
stream1.window(3600 * 1, 60 * 5).join(stream2.window(3600 * 1, 60 * 5)).foreachRDD(statistics)
stream1.window(3600 * 1, 60 * 5).join(stream2).foreachRDD(statistics)
stream1.join(stream2).window(3600 * 1, 60 * 5).foreachRDD(statistics)
哪一个正确的方法?
但似乎有3种方式不能调用统计数据