Github user rxin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5392#discussion_r28725731
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/Client.scala ---
    @@ -17,33 +17,40 @@
     
     package org.apache.spark.deploy
     
    -import scala.concurrent._
    +import scala.concurrent.ExecutionContext
    +import scala.reflect.ClassTag
    +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.{SparkExitCode, 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.newDaemonSingleThreadScheduledExecutor("client-forward-message")
    +  private implicit val forwardMessageExecutionContext =
    --- End diff --
    
    who uses this? can we make it non-implicit instead and explicitly call this 
variable when we use it? Being implicit makes it fairly hard to review/change 
in the future.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to