vanzin commented on a change in pull request #26433: [SPARK-29771][K8S] Add
configure to limit executor failures
URL: https://github.com/apache/spark/pull/26433#discussion_r347006840
##########
File path:
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/scheduler/cluster/k8s/ExecutorPodsAllocator.scala
##########
@@ -145,6 +157,13 @@ private[spark] class ExecutorPodsAllocator(
logDebug(s"Pod allocation status: $currentRunningCount running, " +
s"${currentPendingExecutors.size} pending, " +
s"${newlyCreatedExecutors.size} unacknowledged.")
+
+ val numFailedExecutors =
+ EXECUTOR_ID_COUNTER.get() - currentPendingExecutors.size -
currentRunningCount
+ if (numFailedExecutors >= maxNumExecutorFailures) {
+ logError(s"Max number of executor failures ($maxNumExecutorFailures)
reached")
+ System.exit(EXIT_MAX_EXECUTOR_FAILURES)
Review comment:
This isn't a good way to stop the application. It may be running as part of
other code that can recover from such a failure.
You should do something like stop the SparkContext instead.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]