diff --git a/kyuubi-common/src/main/scala/org/apache/kyuubi/service/TBinaryFrontendService.scala b/kyuubi-common/src/main/scala/org/apache/kyuubi/service/TBinaryFrontendService.scala index fbd376806..c23d4dc27 100644 --- a/kyuubi-common/src/main/scala/org/apache/kyuubi/service/TBinaryFrontendService.scala +++ b/kyuubi-common/src/main/scala/org/apache/kyuubi/service/TBinaryFrontendService.scala @@ -100,7 +100,9 @@ abstract class TBinaryFrontendService(name: String) override def run(): Unit = try { - info(s"Starting and exposing JDBC connection at: jdbc:hive2://$connectionUrl/") + if (isServer()) { + info(s"Starting and exposing JDBC connection at: jdbc:hive2://$connectionUrl/") + } server.foreach(_.serve()) } catch { case _: InterruptedException => error(s"$getName is interrupted") @@ -113,4 +115,6 @@ abstract class TBinaryFrontendService(name: String) server.foreach(_.stop()) server = None } + + protected def isServer(): Boolean = false } diff --git a/kyuubi-server/src/main/scala/org/apache/kyuubi/server/KyuubiTBinaryFrontendService.scala b/kyuubi-server/src/main/scala/org/apache/kyuubi/server/KyuubiTBinaryFrontendService.scala index e17a5319d..701003cda 100644 --- a/kyuubi-server/src/main/scala/org/apache/kyuubi/server/KyuubiTBinaryFrontendService.scala +++ b/kyuubi-server/src/main/scala/org/apache/kyuubi/server/KyuubiTBinaryFrontendService.scala @@ -72,4 +72,6 @@ final class KyuubiTBinaryFrontendService( override protected def oomHook: Runnable = { () => serverable.stop() } + + override protected def isServer(): Boolean = true }