You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by GitBox <gi...@apache.org> on 2021/09/24 02:06:33 UTC

[GitHub] [incubator-kyuubi] pan3793 commented on a change in pull request #1144: [KYUUBI #1143] Refact Serverable/FrontendService/ServiceDiscovery hierarchy

pan3793 commented on a change in pull request #1144:
URL: https://github.com/apache/incubator-kyuubi/pull/1144#discussion_r715269076



##########
File path: kyuubi-server/src/main/scala/org/apache/kyuubi/events/KyuubiSessionEvent.scala
##########
@@ -55,7 +55,7 @@ case class KyuubiSessionEvent(
 object KyuubiSessionEvent {
   def apply(session: KyuubiSessionImpl): KyuubiSessionEvent = {
     assert(KyuubiServer.kyuubiServer != null)
-    val serverIP = KyuubiServer.kyuubiServer.connectionUrl
+    val serverIP = KyuubiServer.kyuubiServer.frontendServices.head.connectionUrl

Review comment:
       I think we can add a method in `Utils` which check `frontendServices` only has one element and extract `connectionUrl` from the it.

##########
File path: kyuubi-server/src/main/scala/org/apache/kyuubi/events/KyuubiSessionEvent.scala
##########
@@ -55,7 +55,7 @@ case class KyuubiSessionEvent(
 object KyuubiSessionEvent {
   def apply(session: KyuubiSessionImpl): KyuubiSessionEvent = {
     assert(KyuubiServer.kyuubiServer != null)
-    val serverIP = KyuubiServer.kyuubiServer.connectionUrl
+    val serverIP = KyuubiServer.kyuubiServer.frontendServices.head.connectionUrl

Review comment:
       I think we can add a method in `Utils` which check `frontendServices` only has one element and extract `connectionUrl` from it.




-- 
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: commits-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org