spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aarondav <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-6602][Core] Update Master, Worker, Clie...
Date Mon, 29 Jun 2015 21:56:55 GMT
Github user aarondav commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5392#discussion_r33518468
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/worker/Worker.scala ---
    @@ -235,21 +250,47 @@ private[worker] class Worker(
              * still not safe if the old master recovers within this interval, but this is
a much
              * less likely scenario.
              */
    -        if (master != null) {
    -          master ! RegisterWorker(
    -            workerId, host, port, cores, memory, webUi.boundPort, publicAddress)
    -        } else {
    -          // We are retrying the initial registration
    -          tryRegisterAllMasters()
    +        master match {
    +          case Some(masterRef) =>
    +            // registered == false && master != None means we lost the connection
to master, so
    +            // masterRef cannot be used and we need to recreate it again. Note: we must
not set
    +            // master to None due to the above comments.
    +            if (registerMasterFutures != null) {
    +              registerMasterFutures.foreach(_.cancel(true))
    +            }
    +            val masterAddress = masterRef.address
    +            registerMasterFutures = Array(registerMasterThreadPool.submit(new Runnable
{
    +              override def run(): Unit =
    --- End diff --
    
    nit: braces


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


Mime
View raw message