spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zsxwing <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-6602][Core] Update Master, Worker, Clie...
Date Wed, 08 Apr 2015 13:40:42 GMT
Github user zsxwing commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5392#discussion_r27969874
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/Client.scala ---
    @@ -17,33 +17,38 @@
     
     package org.apache.spark.deploy
     
    -import scala.concurrent._
    +import scala.concurrent.ExecutionContext
    +import scala.util.{Failure, Success}
     
    -import akka.actor._
    -import akka.pattern.ask
    -import akka.remote.{AssociationErrorEvent, DisassociatedEvent, RemotingLifecycleEvent}
     import org.apache.log4j.{Level, Logger}
     
    +import org.apache.spark.rpc.{RpcEndpointRef, RpcAddress, RpcEnv, ThreadSafeRpcEndpoint}
     import org.apache.spark.{Logging, SecurityManager, SparkConf}
     import org.apache.spark.deploy.DeployMessages._
     import org.apache.spark.deploy.master.{DriverState, Master}
    -import org.apache.spark.util.{ActorLogReceive, AkkaUtils, Utils}
    +import org.apache.spark.util.Utils
     
     /**
      * Proxy that relays messages to the driver.
      */
    -private class ClientActor(driverArgs: ClientArguments, conf: SparkConf)
    -  extends Actor with ActorLogReceive with Logging {
    -
    -  var masterActor: ActorSelection = _
    -  val timeout = AkkaUtils.askTimeout(conf)
    -
    -  override def preStart(): Unit = {
    -    masterActor = context.actorSelection(
    -      Master.toAkkaUrl(driverArgs.master, AkkaUtils.protocol(context.system)))
    -
    -    context.system.eventStream.subscribe(self, classOf[RemotingLifecycleEvent])
    +private class ClientEndpoint(
    +    override val rpcEnv: RpcEnv,
    +    driverArgs: ClientArguments,
    +    masterEndpoint: RpcEndpointRef,
    +    conf: SparkConf)
    +  extends ThreadSafeRpcEndpoint with Logging {
    +
    +  private val forwardMessageThread = Utils.newDaemonFixedThreadPool(1, "client-forward-message")
    --- End diff --
    
    Just my personal habit. I usually use `Thread` to highlight that it's a single thread
executor.


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