Github user markhamstra commented on a diff in the pull request:
https://github.com/apache/spark/pull/7014#discussion_r33371157
--- Diff:
core/src/main/scala/org/apache/spark/scheduler/TaskSetManager.scala ---
@@ -662,6 +662,7 @@ private[spark] class TaskSetManager(
val failureReason = s"Lost task ${info.id} in stage ${taskSet.id} (TID
$tid, ${info.host}): " +
reason.asInstanceOf[TaskFailedReason].toErrorString
+ var failureException: Option[Throwable] = None
reason match {
--- End diff --
I'd prefer that you avoid the unnecessary mutability. The `match` cases
are all quite small with the exception of the `ExceptionFailure` case, which
means that even with the `var` it's not all that readable or easy to figure out
just where `failureException` is being set and that it is not being mutated
elsewhere. If you really want to shorten the `match` and make it more
readable, I suggest pulling the logic of the `ExceptionFailure` case out into a
helper function defined within `def handleFailedTask`, then make each of the
cases in the `match` produce `None` or `Some(throwable)`.
---
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]