Why does Spark fail with “Failed to get broadcast_0_piece0 of broadcast_0” in local mode?

前端 未结 5 1184
孤城傲影
孤城傲影 2021-02-06 10:59

I\'m running this snippet to sort an RDD of points, ordering the RDD and taking the K-nearest points from a given point:

def getKNN(sparkContext:SparkContext, k:         


        
5条回答
  •  北荒
    北荒 (楼主)
    2021-02-06 11:34

    Just discovered why I was getting this exception: for a reason my SparkContext object started/stopped several times between ScalaTest methods. So, fixing that behaviour lead me to get spark working in the right way I would expect.

提交回复
热议问题