-
- Downloads
[SPARK-6331] Load new master URL if present when recovering streaming context from checkpoint
In streaming driver recovery, when the SparkConf is reconstructed based on the checkpointed configuration, it recovers the old master URL. This okay if the cluster on which the streaming application is relaunched is the same cluster as it was running before. But if that cluster changes, there is no way to inject the new master URL of the new cluster. As a result, the restarted app tries to connect to the non-existent old cluster and fails. The solution is to check whether a master URL is set in the System properties (by Spark submit) before recreating the SparkConf. If a new master url is set in the properties, then use it as that is obviously the most relevant one. Otherwise load the old one (to maintain existing behavior). Author: Tathagata Das <tathagata.das1565@gmail.com> Closes #5024 from tdas/SPARK-6331 and squashes the following commits: 392fd44 [Tathagata Das] Fixed naming issue. c7c0b99 [Tathagata Das] Addressed comments. 6a0857c [Tathagata Das] Updated testsuites. 222485d [Tathagata Das] Load new master URL if present when recovering streaming context from checkpoint
Showing
- streaming/src/main/scala/org/apache/spark/streaming/Checkpoint.scala 5 additions, 2 deletions...rc/main/scala/org/apache/spark/streaming/Checkpoint.scala
- streaming/src/main/scala/org/apache/spark/streaming/StreamingContext.scala 1 addition, 1 deletion...n/scala/org/apache/spark/streaming/StreamingContext.scala
- streaming/src/test/scala/org/apache/spark/streaming/CheckpointSuite.scala 18 additions, 3 deletions...st/scala/org/apache/spark/streaming/CheckpointSuite.scala
- streaming/src/test/scala/org/apache/spark/streaming/StreamingContextSuite.scala 1 addition, 1 deletion...la/org/apache/spark/streaming/StreamingContextSuite.scala
Loading
Please register or sign in to comment