Skip to content

Commit

Permalink
[SPARK-22294][DEPLOY] Reset spark.driver.bindAddress when starting a …
Browse files Browse the repository at this point in the history
…Checkpoint

## What changes were proposed in this pull request?

It seems that recovering from a checkpoint can replace the old
driver and executor IP addresses, as the workload can now be taking
place in a different cluster configuration. It follows that the
bindAddress for the master may also have changed. Thus we should not be
keeping the old one, and instead be added to the list of properties to
reset and recreate from the new environment.

## How was this patch tested?

This patch was tested via manual testing on AWS, using the experimental (not yet merged) Kubernetes scheduler, which uses bindAddress to bind to a Kubernetes service (and thus was how I first encountered the bug too), but it is not a code-path related to the scheduler and this may have slipped through when merging SPARK-4563.

Author: Santiago Saavedra <ssaavedra@openshine.com>

Closes apache#19427 from ssaavedra/fix-checkpointing-master.

(cherry picked from commit 5ebdcd1)
Signed-off-by: Shixiong Zhu <zsxwing@gmail.com>
  • Loading branch information
ssaavedra authored and MatthewRBruce committed Jul 31, 2018
1 parent f1d8cdd commit 6e82644
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class Checkpoint(ssc: StreamingContext, val checkpointTime: Time)
"spark.yarn.app.id",
"spark.yarn.app.attemptId",
"spark.driver.host",
"spark.driver.bindAddress",
"spark.driver.port",
"spark.master",
"spark.yarn.jars",
Expand All @@ -63,6 +64,7 @@ class Checkpoint(ssc: StreamingContext, val checkpointTime: Time)

val newSparkConf = new SparkConf(loadDefaults = false).setAll(sparkConfPairs)
.remove("spark.driver.host")
.remove("spark.driver.bindAddress")
.remove("spark.driver.port")
val newReloadConf = new SparkConf(loadDefaults = true)
propertiesToReload.foreach { prop =>
Expand Down

0 comments on commit 6e82644

Please sign in to comment.