Github user tdas commented on a diff in the pull request:
https://github.com/apache/spark/pull/8950#discussion_r41219078
--- Diff:
streaming/src/main/scala/org/apache/spark/streaming/ui/BatchPage.scala ---
@@ -265,16 +323,20 @@ private[ui] class BatchPage(parent: StreamingTab)
extends WebUIPage("batch") {
* Generate the job table for the batch.
*/
private def generateJobTable(batchUIData: BatchUIData): Seq[Node] = {
- val outputOpIdToSparkJobIds =
batchUIData.outputOpIdSparkJobIdPairs.groupBy(_.outputOpId).toSeq.
- sortBy(_._1). // sorted by OutputOpId
+ val outputOpIdToSparkJobIds =
batchUIData.outputOpIdSparkJobIdPairs.groupBy(_.outputOpId).
map { case (outputOpId, outputOpIdAndSparkJobIds) =>
// sort SparkJobIds for each OutputOpId
(outputOpId, outputOpIdAndSparkJobIds.map(_.sparkJobId).sorted)
}
+ val outputOps = (0 until batchUIData.numOutputOp).map { outputOpId =>
+ val status = batchUIData.failureReason.getOrElse(outputOpId,
"Succeeded")
--- End diff --
Here is a possible logic.
If no failure reason,
then "Succeeded"
Else if failure reason contains "SparkException"
then "Failed due to Spark job error"
Else
then "Failed"
This should work fine for most cases, where the user is not doing fancy
things like catching exceptions themselves and ignoring/rethrowing them. Isnt
it?
Consider your example. If the user catches Spark job exception (most
probably SparkException) and rethrows it, the above logic should identify it as
Spark job error and say "Failed due to Spark job error". On the other hand, if
the user catches and ignore exception, then failure reason will be empty and
the output will be marked as "Succeeded" (even though Spark job error will not
be empty, which is okay).
---
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]