Github user vanzin commented on a diff in the pull request: https://github.com/apache/spark/pull/17658#discussion_r112267954 --- Diff: core/src/main/scala/org/apache/spark/scheduler/ApplicationEventListener.scala --- @@ -57,4 +58,9 @@ private[spark] class ApplicationEventListener extends SparkListener { adminAclsGroups = allProperties.get("spark.admin.acls.groups") } } + + override def onOtherEvent(event:SparkListenerEvent): Unit = event match { + case SparkListenerLogStart(sparkVersion) => + appSparkVersion = Some(sparkVersion) + } --- End diff -- You need a "catch all" here: ``` scala> class MyListener extends org.apache.spark.scheduler.SparkListener { | override def onOtherEvent(event: org.apache.spark.scheduler.SparkListenerEvent): Unit = event match { | case _: org.apache.spark.scheduler.SparkListenerTaskStart => () | } | } defined class MyListener scala> sc.addSparkListener(new MyListener()) scala> spark.range(1000).write.saveAsTable("test") 17/04/19 10:39:01 ERROR LiveListenerBus: Listener MyListener threw an exception scala.MatchError: SparkListenerSQLExecutionStart(0,saveAsTable at <console>:27,org.apache.spark.sql.DataFrameWriter.saveAsTable(DataFrameWriter.scala:354) ```
--- 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