You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by zsxwing <gi...@git.apache.org> on 2016/08/31 00:22:23 UTC
[GitHub] spark pull request #14882: [SPARK-17316][Core] Make CoarseGrainedSchedulerBa...
Github user zsxwing commented on a diff in the pull request:
https://github.com/apache/spark/pull/14882#discussion_r76904694
--- Diff: core/src/main/scala/org/apache/spark/scheduler/cluster/CoarseGrainedSchedulerBackend.scala ---
@@ -406,13 +406,14 @@ class CoarseGrainedSchedulerBackend(scheduler: TaskSchedulerImpl, val rpcEnv: Rp
conf.getInt("spark.default.parallelism", math.max(totalCoreCount.get(), 2))
}
- // Called by subclasses when notified of a lost worker
- def removeExecutor(executorId: String, reason: ExecutorLossReason) {
- try {
- driverEndpoint.askWithRetry[Boolean](RemoveExecutor(executorId, reason))
- } catch {
- case e: Exception =>
- throw new SparkException("Error notifying standalone scheduler's driver endpoint", e)
+ /**
+ * Called by subclasses when notified of a lost worker. It just fires the message and returns
+ * at once.
+ */
+ protected def removeExecutor(executorId: String, reason: ExecutorLossReason): Unit = {
+ // Only log the failure since we don't care about the result.
+ driverEndpoint.ask(RemoveExecutor(executorId, reason)).onFailure { case t =>
--- End diff --
I still need to use `ask` since there are some places using `ask(RemoveExecutor)`.
---
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