aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorecho2mei <534384876@qq.com>2015-12-25 17:42:24 -0800
committerShixiong Zhu <shixiong@databricks.com>2015-12-25 17:42:24 -0800
commit1e97813951674aa5419744b455a4c7340462ac59 (patch)
tree64c23b848ab8ff9ae045a773b2e07c19899f34f3
parentea4aab7e87fbcf9ac90f93af79cc892b56508aa0 (diff)
downloadspark-1e97813951674aa5419744b455a4c7340462ac59.tar.gz
spark-1e97813951674aa5419744b455a4c7340462ac59.tar.bz2
spark-1e97813951674aa5419744b455a4c7340462ac59.zip
[SPARK-12396][CORE] Modify the function scheduleAtFixedRate to schedule.
Instead of just cancel the registrationRetryTimer to avoid driver retry connect to master, change the function to schedule. It is no need to register to master iteratively. Author: echo2mei <534384876@qq.com> Closes #10447 from echoTomei/master.
-rw-r--r--core/src/main/scala/org/apache/spark/deploy/client/AppClient.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/src/main/scala/org/apache/spark/deploy/client/AppClient.scala b/core/src/main/scala/org/apache/spark/deploy/client/AppClient.scala
index 1e2f469214..a5753e1053 100644
--- a/core/src/main/scala/org/apache/spark/deploy/client/AppClient.scala
+++ b/core/src/main/scala/org/apache/spark/deploy/client/AppClient.scala
@@ -124,7 +124,7 @@ private[spark] class AppClient(
*/
private def registerWithMaster(nthRetry: Int) {
registerMasterFutures.set(tryRegisterAllMasters())
- registrationRetryTimer.set(registrationRetryThread.scheduleAtFixedRate(new Runnable {
+ registrationRetryTimer.set(registrationRetryThread.schedule(new Runnable {
override def run(): Unit = {
Utils.tryOrExit {
if (registered.get) {
@@ -138,7 +138,7 @@ private[spark] class AppClient(
}
}
}
- }, REGISTRATION_TIMEOUT_SECONDS, REGISTRATION_TIMEOUT_SECONDS, TimeUnit.SECONDS))
+ }, REGISTRATION_TIMEOUT_SECONDS, TimeUnit.SECONDS))
}
/**