Github user vanzin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/9297#discussion_r45100247
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/ui/SQLListener.scala ---
    @@ -289,6 +311,38 @@ private[sql] class SQLListener(conf: SparkConf) 
extends SparkListener with Loggi
     
     }
     
    +private[spark] class SQLHistoryListener(conf: SparkConf, sparkUI: SparkUI)
    +  extends SQLListener(conf) {
    +
    +  var sqlTabAttached = false
    +
    +  override def onExecutorMetricsUpdate(
    +      executorMetricsUpdate: SparkListenerExecutorMetricsUpdate): Unit = 
synchronized {
    +    // Do nothing
    +  }
    +
    +  override def onTaskEnd(taskEnd: SparkListenerTaskEnd): Unit = 
synchronized {
    +    updateTaskAccumulatorValues(
    +      taskEnd.taskInfo.taskId,
    +      taskEnd.stageId,
    +      taskEnd.stageAttemptId,
    +      taskEnd.taskInfo.accumulables.map { acc =>
    +        (acc.id, new LongSQLMetricValue(acc.update.getOrElse("0").toLong))
    +      }.toMap,
    +      finishTask = true)
    +  }
    +
    +  override def onOtherEvent(event: SparkListenerEvent): Unit = event match 
{
    +    case executionStart: SparkListenerSQLExecutionStart =>
    --- End diff --
    
    `executionStart` is not used, so you can do `case _: Spark... =>`


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to