Github user tomwhite commented on a diff in the pull request:
https://github.com/apache/spark/pull/7014#discussion_r33454836
--- Diff: core/src/main/scala/org/apache/spark/TaskEndReason.scala ---
@@ -97,11 +101,17 @@ case class ExceptionFailure(
description: String,
stackTrace: Array[StackTraceElement],
fullStackTrace: String,
- metrics: Option[TaskMetrics])
+ metrics: Option[TaskMetrics],
+ exception: Option[Throwable] = None)
--- End diff --
@pwendell You're right - it will break pattern matching on the class. My
understanding is that an `unapply` method won't help since pattern matching
won't use it (they are for user code).
Case classes don't play well with binary compatibility, it seems. To do
this compatibly, we'd have to have another case class, called
`ExceptionFailureWithCause` say, and a trait that both it and
`ExceptionFailure` extend with the common fields. Then everywhere that handles
`ExceptionFailure` would also have to handle `ExceptionFailureWithCause`.
Having said all that, this class is marked `@DeveloperApi` so it's within
the contract to change it. The `fullStackTrace` field was added last November,
for example. I can understand the general reluctance to change code even if it
is marked as being for developers only, but it's not clear if the workaround
here to preserve binary compatibility is worth the complexity it adds.
---
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]