Github user ilganeli commented on a diff in the pull request:
https://github.com/apache/spark/pull/5636#discussion_r35605388
--- Diff: core/src/main/scala/org/apache/spark/scheduler/Stage.scala ---
@@ -76,6 +76,33 @@ private[spark] abstract class Stage(
*/
private var _latestInfo: StageInfo = StageInfo.fromStage(this,
nextAttemptId)
+ /**
+ * Spark is resilient to executors dying by retrying stages on
FetchFailures. Here, we keep track
+ * of the number of stage failures to prevent endless stage retries.
+ */
+ private var failedStageCount = 0
+
+ private[scheduler] def clearFailures() : Unit = {
+ failedStageCount = 0
+ }
+
+ /**
+ * Check whether we should abort the failedStage due to multiple
failures.
+ * This method updates the running count of failures for a particular
stage and returns
+ * true if the number of failures exceeds the allowable number of
failures.
+ */
+ private[scheduler] def failAndShouldAbort(): Boolean = {
+ // We increment the failure count on the first attempt for a
particular Stage
+ if (_latestInfo.attemptId == 0)
+ {
+ failedStageCount += 1
+ }
--- End diff --
That's what I had a few commits prior, as I understood it, we wanted a set
since at that time we were concerned about multiple concurrent attempts (and
thus failures) per stage. From the test harness though, I guess what we really
need is to track failures per stageId.
---
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]