call of distinct and map together throws NPE in spark library

前端 未结 2 1542
醉酒成梦
醉酒成梦 2020-11-30 12:44

I am unsure if this is a bug, so if you do something like this

// d:spark.RDD[String]
d.distinct().map(x => d.filter(_.equals(x)))

you w

2条回答
  •  死守一世寂寞
    2020-11-30 13:22

    what about the windowing example provided in the Spark 1.3.0 stream programming guide

    val dataset: RDD[String, String] = ...
    val windowedStream = stream.window(Seconds(20))...
    val joinedStream = windowedStream.transform { rdd => rdd.join(dataset) }
    

    SPARK-5063 causes the example to fail since the join is being called from within the transform method on an RDD

提交回复
热议问题