-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-43482][SS] Expand QueryTerminatedEvent to contain error class if it exists in exception #41150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPARK-43482][SS] Expand QueryTerminatedEvent to contain error class if it exists in exception #41150
Changes from all commits
f7ff8a6
3edf2b6
060a6b4
ed5e006
af2c3c2
ce284ba
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -154,11 +154,22 @@ object StreamingQueryListener { | |
| * @param runId A query id that is unique for every start/restart. See `StreamingQuery.runId()`. | ||
| * @param exception The exception message of the query if the query was terminated | ||
| * with an exception. Otherwise, it will be `None`. | ||
| * @param errorClassOnException The error class from the exception if the query was terminated | ||
| * with an exception which is a part of error class framework. | ||
|
Comment on lines
+157
to
+158
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is error class framework a public API that end-users understand or can find document?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. SparkException and SparkThrowable are all public API where we expose to API doc. It's just that we lack about documentation for these classes. That's something we have to fix; we could probably refer to SparkThrowable.getErrorClass here, but it's not documented so wouldn't help unfortunately.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we think it'd be better to not mention about error class framework and say "this gives an error classification if the exception is available and classified"? If then I can avoid mentioning error class framework. @HyukjinKwon WDYT? cc. @MaxGekk
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it's fine .. it's sort of documented ..e.g., https://github.com/apache/spark/blob/master/docs/sql-error-conditions-connect-error-class.md
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. https://spark.apache.org/docs/latest/sql-error-conditions.html Above is the landing page on website. It's in SQL guide doc. |
||
| * If the query was terminated without an exception, or the | ||
| * exception is not a part of error class framework, it will be | ||
| * `None`. | ||
| * @since 2.1.0 | ||
| */ | ||
| @Evolving | ||
| class QueryTerminatedEvent private[sql]( | ||
| val id: UUID, | ||
| val runId: UUID, | ||
| val exception: Option[String]) extends Event | ||
| val exception: Option[String], | ||
| val errorClassOnException: Option[String]) extends Event { | ||
| // compatibility with versions in prior to 3.5.0 | ||
| def this(id: UUID, runId: UUID, exception: Option[String]) = { | ||
| this(id, runId, exception, None) | ||
| } | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.