Skip to content

Commit 52eb54d

Browse files
committed
[Spark 1877] ClassNotFoundException when loading RDD with serialized objects
Updated version of #821 Author: Tathagata Das <tathagata.das1565@gmail.com> Author: Ghidireac <bogdang@u448a5b0a73d45358d94a.ant.amazon.com> Closes #835 from tdas/SPARK-1877 and squashes the following commits: f346f71 [Tathagata Das] Addressed Patrick's comments. fee0c5d [Ghidireac] SPARK-1877: ClassNotFoundException when loading RDD with serialized objects
1 parent bcb9dce commit 52eb54d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/main/scala/org/apache/spark/SparkContext.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ class SparkContext(config: SparkConf) extends Logging {
718718
minPartitions: Int = defaultMinPartitions
719719
): RDD[T] = {
720720
sequenceFile(path, classOf[NullWritable], classOf[BytesWritable], minPartitions)
721-
.flatMap(x => Utils.deserialize[Array[T]](x._2.getBytes))
721+
.flatMap(x => Utils.deserialize[Array[T]](x._2.getBytes, Utils.getContextOrSparkClassLoader))
722722
}
723723

724724
protected[spark] def checkpointFile[T: ClassTag](

0 commit comments

Comments
 (0)