Skip to content

Commit 65ef3e9

Browse files
author
Andrew Or
committed
Fix NPE
1 parent a0d3263 commit 65ef3e9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

core/src/main/scala/org/apache/spark/rdd/RDDOperationScope.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ import org.apache.spark.SparkContext
4343
@JsonPropertyOrder(Array("id", "name", "parent"))
4444
private[spark] class RDDOperationScope(
4545
val name: String,
46-
val parent: Option[RDDOperationScope] = None) {
46+
val parent: Option[RDDOperationScope] = None) extends Serializable {
4747

4848
val id: Int = RDDOperationScope.nextScopeId()
4949

streaming/src/main/scala/org/apache/spark/streaming/dstream/DStream.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ abstract class DStream[T: ClassTag] (
117117
* Instead, every time we call `compute` we instantiate a new scope using the same name as this
118118
* one. Otherwise, all RDDs ever created by this DStream will be in the same scope.
119119
*/
120-
@transient private val scope: Option[RDDOperationScope] = {
120+
private val scope: Option[RDDOperationScope] = {
121121
Option(ssc.sc.getLocalProperty(SparkContext.RDD_SCOPE_KEY)).map(RDDOperationScope.fromJson)
122122
}
123123

0 commit comments

Comments
 (0)