From 746a94a7c8e09cf3039e62cefc688e3c3f5d7e2e Mon Sep 17 00:00:00 2001 From: ulysses-you Date: Wed, 9 Mar 2022 17:53:15 +0800 Subject: [PATCH] [KYUUBI #2072] Improve rest server behavior ### _Why are the changes needed?_ 1. use host address rather than host name, since we also use host address in thrift server 2. remove alert in web ui, it's noisy.. ### _How was this patch tested?_ - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [ ] Add screenshots for manual tests if appropriate - [x] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request Closes #2073 from ulysses-you/web-ui. Closes #2072 91b6f5b3 [ulysses-you] rest Authored-by: ulysses-you Signed-off-by: Kent Yao --- .../src/main/resources/org/apache/kyuubi/ui/static/kyuubi.js | 1 - .../org/apache/kyuubi/server/KyuubiRestFrontendService.scala | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/kyuubi-server/src/main/resources/org/apache/kyuubi/ui/static/kyuubi.js b/kyuubi-server/src/main/resources/org/apache/kyuubi/ui/static/kyuubi.js index 4b840b691..84c3a8f9d 100644 --- a/kyuubi-server/src/main/resources/org/apache/kyuubi/ui/static/kyuubi.js +++ b/kyuubi-server/src/main/resources/org/apache/kyuubi/ui/static/kyuubi.js @@ -43,5 +43,4 @@ $(function(){ }); } $('.item.server.version.right.padded').val(kyuubiVersion) - alert(kyuubiVersion); }); diff --git a/kyuubi-server/src/main/scala/org/apache/kyuubi/server/KyuubiRestFrontendService.scala b/kyuubi-server/src/main/scala/org/apache/kyuubi/server/KyuubiRestFrontendService.scala index 37d01f53f..ed571b725 100644 --- a/kyuubi-server/src/main/scala/org/apache/kyuubi/server/KyuubiRestFrontendService.scala +++ b/kyuubi-server/src/main/scala/org/apache/kyuubi/server/KyuubiRestFrontendService.scala @@ -39,7 +39,7 @@ class KyuubiRestFrontendService(override val serverable: Serverable) override def initialize(conf: KyuubiConf): Unit = synchronized { val host = conf.get(FRONTEND_REST_BIND_HOST) - .getOrElse(Utils.findLocalInetAddress.getHostName) + .getOrElse(Utils.findLocalInetAddress.getHostAddress) server = JettyServer(getName, host, conf.get(FRONTEND_REST_BIND_PORT)) super.initialize(conf) }