HeartSaVioR commented on a change in pull request #26201: [SPARK-29543][SS][UI]
Init structured streaming ui
URL: https://github.com/apache/spark/pull/26201#discussion_r365654786
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/streaming/StreamingQueryManager.scala
##########
@@ -68,6 +69,9 @@ class StreamingQueryManager private[sql] (sparkSession:
SparkSession) extends Lo
logInfo(s"Registered listener ${listener.getClass.getName}")
})
}
+ if (sparkSession.sparkContext.conf.get(UI_ENABLED)) {
Review comment:
`UI_ENABLED` is being checked twice, and `.get` is called anyway, defeating
the purpose of Option.
This would behave similar but checks UI_ENABLED only once and leverages
Option properly.
```
sparkSession.sharedState.streamingQueryStatusListener.foreach { listener =>
addListener(listener)
}
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]