Skip to content

Commit c7c0b99

Browse files
committed
Addressed comments.
1 parent 6a0857c commit c7c0b99

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

streaming/src/main/scala/org/apache/spark/streaming/Checkpoint.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ class Checkpoint(@transient ssc: StreamingContext, val checkpointTime: Time)
4747
val newSparkConf = new SparkConf(loadDefaults = false).setAll(sparkConfPairs)
4848
.remove("spark.driver.host")
4949
.remove("spark.driver.port")
50-
new SparkConf(loadDefaults = true).getOption("spark.master") match {
51-
case Some(newMaster) => newSparkConf.setMaster(newMaster)
52-
case _ => None
50+
val oldMaster = new SparkConf(loadDefaults = true).getOption("spark.master")
51+
oldMaster.foreach { newMaster =>
52+
newSparkConf.setMaster(newMaster)
5353
}
5454
newSparkConf
5555
}

0 commit comments

Comments
 (0)