We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3072054 commit aa835d8Copy full SHA for aa835d8
src/main/scala/com/high-performance-spark-examples/goldilocks/RDDJoinExamples.scala
@@ -108,11 +108,11 @@ object RDDJoinExamples {
108
V2 : ClassTag](bigRDD : RDD[(K, V1)],
109
smallRDD : RDD[(K, V2)])= {
110
val smallRDDLocal: Map[K, V2] = smallRDD.collectAsMap()
111
- bigRDD.sparkContext.broadcast(smallRDDLocal)
+ val smallRDDLocalBcast = bigRDD.sparkContext.broadcast(smallRDDLocal)
112
bigRDD.mapPartitions(iter => {
113
iter.flatMap{
114
case (k,v1 ) =>
115
- smallRDDLocal.get(k) match {
+ smallRDDLocalBcast.value.get(k) match {
116
case None => Seq.empty[(K, (V1, V2))]
117
case Some(v2) => Seq((k, (v1, v2)))
118
}
0 commit comments