You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by zs...@apache.org on 2015/12/26 02:42:24 UTC

spark git commit: [SPARK-12396][CORE] Modify the function scheduleAtFixedRate to schedule.

Repository: spark
Updated Branches:
  refs/heads/master ea4aab7e8 -> 1e9781395


[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 <53...@qq.com>

Closes #10447 from echoTomei/master.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/1e978139
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/1e978139
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/1e978139

Branch: refs/heads/master
Commit: 1e97813951674aa5419744b455a4c7340462ac59
Parents: ea4aab7
Author: echo2mei <53...@qq.com>
Authored: Fri Dec 25 17:42:24 2015 -0800
Committer: Shixiong Zhu <sh...@databricks.com>
Committed: Fri Dec 25 17:42:24 2015 -0800

----------------------------------------------------------------------
 .../main/scala/org/apache/spark/deploy/client/AppClient.scala    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/1e978139/core/src/main/scala/org/apache/spark/deploy/client/AppClient.scala
----------------------------------------------------------------------
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 1e2f469..a5753e1 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))
     }
 
     /**


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org