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

    https://github.com/apache/spark/pull/14710#discussion_r76348848
  
    --- Diff: 
yarn/src/main/scala/org/apache/spark/scheduler/cluster/YarnSchedulerBackend.scala
 ---
    @@ -269,20 +258,22 @@ private[spark] abstract class YarnSchedulerBackend(
           case AddWebUIFilter(filterName, filterParams, proxyBase) =>
             addWebUIFilter(filterName, filterParams, proxyBase)
     
    -      case RemoveExecutor(executorId, reason) =>
    +      case r @ RemoveExecutor(executorId, reason) =>
             logWarning(reason.toString)
    -        removeExecutor(executorId, reason)
    +        driverEndpoint.ask[Boolean](r).onFailure {
    +          case e =>
    +            logError(s"Error requesting driver to remove executor 
$executorId for reason $reason")
    +        }
         }
     
     
         override def receiveAndReply(context: RpcCallContext): 
PartialFunction[Any, Unit] = {
           case r: RequestExecutors =>
             amEndpoint match {
               case Some(am) =>
    -            Future {
    -              context.reply(am.askWithRetry[Boolean](r))
    -            } onFailure {
    -              case NonFatal(e) =>
    +            am.ask[Boolean](r).andThen {
    --- End diff --
    
    Similarly here, could you replace `askAmExecutor` with 
`ThreadUtils.sameThreadExecutionContext` and get rid of another thread pool?


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to