You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "juliuszsompolski (via GitHub)" <gi...@apache.org> on 2023/07/14 23:07:39 UTC
[GitHub] [spark] juliuszsompolski commented on a diff in pull request #41964: [SPARK-44394][CONNECT][WEBUI] Add a Spark UI page for Spark Connect
juliuszsompolski commented on code in PR #41964:
URL: https://github.com/apache/spark/pull/41964#discussion_r1264232249
##########
connector/connect/server/src/main/scala/org/apache/spark/sql/connect/service/SparkConnectService.scala:
##########
@@ -259,13 +281,15 @@ object SparkConnectService {
if (debugMode) {
sb.addService(ProtoReflectionService.newInstance())
}
+
server = sb.build
server.start()
+ createListenerAndUI(sparkContextOpt.getOrElse(SparkSession.active.sparkContext))
}
// Starts the service
- def start(): Unit = {
- startGRPCService()
+ def start(sparkContextOpt: Option[SparkContext] = None): Unit = {
Review Comment:
make it `sparkContext: SparkContext` , not an option, and in SparkConnectServer pass it explcitly from the session there. better that than having to `.getOrElse(SparkSession.active.sparkContext)` without controlling if there's an active session here
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org