pan3793 commented on code in PR #38732:
URL: https://github.com/apache/spark/pull/38732#discussion_r1027559033


##########
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/scheduler/cluster/k8s/ExecutorPodsAllocator.scala:
##########
@@ -119,6 +126,12 @@ class ExecutorPodsAllocator(
       }
     }
     snapshotsStore.addSubscriber(podAllocationDelay) {
+      maxNumExecutorFailuresOpt.foreach { maxNumExecutorFailures =>
+        if (failureTracker.numFailedExecutors > maxNumExecutorFailures) {
+          logError(s"Max number of executor failures ($maxNumExecutorFailures) 
reached")
+          SparkContext.getActive.foreach(_.stop(EXIT_MAX_EXECUTOR_FAILURES))

Review Comment:
   It's ugly, but `AbstractPodsAllocator` is a developer api, pass `sc` will 
change the constructor signature. Suggestions are welcome.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to