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:04:19 GMT
Github user aarondav commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5392#discussion_r33513145
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/Client.scala ---
    @@ -36,20 +36,30 @@ import org.apache.spark.util.{ActorLogReceive, AkkaUtils, RpcUtils,
Utils}
      * We currently don't support retry if submission fails. In HA mode, client will submit
request to
      * all masters and see which one could handle it.
      */
    -private class ClientActor(driverArgs: ClientArguments, conf: SparkConf)
    -  extends Actor with ActorLogReceive with Logging {
    -
    -  private val masterActors = driverArgs.masters.map { m =>
    -    context.actorSelection(Master.toAkkaUrl(m, AkkaUtils.protocol(context.system)))
    -  }
    -  private val lostMasters = new HashSet[Address]
    -  private var activeMasterActor: ActorSelection = null
    -
    -  val timeout = RpcUtils.askTimeout(conf)
    -
    -  override def preStart(): Unit = {
    -    context.system.eventStream.subscribe(self, classOf[RemotingLifecycleEvent])
    -
    +private class ClientEndpoint(
    +    override val rpcEnv: RpcEnv,
    +    driverArgs: ClientArguments,
    +    masterEndpoints: Seq[RpcEndpointRef],
    +    conf: SparkConf)
    +  extends ThreadSafeRpcEndpoint with Logging {
    +
    +  // A scheduled executor used to send messages at the specified time.
    +  private val forwardMessageThread =
    +    ThreadUtils.newDaemonSingleThreadScheduledExecutor("client-forward-message")
    +  // Used to provide the implicit parameter of `Future` methods.
    +  private val forwardMessageExecutionContext =
    +    ExecutionContext.fromExecutor(forwardMessageThread,
    +      t => t match {
    +        case ie: InterruptedException => // Exit normally
    +        case e =>
    --- End diff --
    
    nit: `e: Throwable` explicitly


---
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