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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to