diff --git a/docs/configuration/settings.md b/docs/configuration/settings.md index 72b5ab520..f102e0a05 100644 --- a/docs/configuration/settings.md +++ b/docs/configuration/settings.md @@ -260,6 +260,7 @@ You can configure the Kyuubi properties in `$KYUUBI_HOME/conf/kyuubi-defaults.co | kyuubi.frontend.rest.proxy.jetty.client.requestBufferSize | 4096 | Size of the buffer in bytes used to write requests for Jetty server used by the RESTful frontend service. | int | 1.10.0 | | kyuubi.frontend.rest.proxy.jetty.client.responseBufferSize | 4096 | Size of the buffer in bytes used to read response for Jetty server used by the RESTful frontend service. | int | 1.10.0 | | kyuubi.frontend.rest.proxy.jetty.client.timeout | PT60S | The total timeout in milliseconds for Jetty server used by the RESTful frontend service. | duration | 1.10.0 | +| kyuubi.frontend.rest.ui.enabled | true | Whether to enable Web UI when RESTful protocol is enabled | boolean | 1.10.0 | | kyuubi.frontend.ssl.keystore.algorithm | <undefined> | SSL certificate keystore algorithm. | string | 1.7.0 | | kyuubi.frontend.ssl.keystore.password | <undefined> | SSL certificate keystore password. | string | 1.7.0 | | kyuubi.frontend.ssl.keystore.path | <undefined> | SSL certificate keystore location. | string | 1.7.0 | diff --git a/kyuubi-common/src/main/scala/org/apache/kyuubi/config/KyuubiConf.scala b/kyuubi-common/src/main/scala/org/apache/kyuubi/config/KyuubiConf.scala index 840421a3d..397c04935 100644 --- a/kyuubi-common/src/main/scala/org/apache/kyuubi/config/KyuubiConf.scala +++ b/kyuubi-common/src/main/scala/org/apache/kyuubi/config/KyuubiConf.scala @@ -626,6 +626,13 @@ object KyuubiConf { .timeConf .createWithDefaultString("PT5S") + val FRONTEND_REST_UI_ENABLED: ConfigEntry[Boolean] = + buildConf("kyuubi.frontend.rest.ui.enabled") + .doc("Whether to enable Web UI when RESTful protocol is enabled") + .version("1.10.0") + .booleanConf + .createWithDefault(true) + val FRONTEND_WORKER_KEEPALIVE_TIME: ConfigEntry[Long] = buildConf("kyuubi.frontend.worker.keepalive.time") .doc("(deprecated) Keep-alive time (in milliseconds) for an idle worker thread") 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 a3dd40389..06eb63fee 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 @@ -111,8 +111,9 @@ class KyuubiRestFrontendService(override val serverable: Serverable) val proxyHandler = ApiRootResource.getEngineUIProxyHandler(this) server.addHandler(authenticationFactory.httpHandlerWrapperFactory.wrapHandler(proxyHandler)) - - installWebUI() + if (conf.get(FRONTEND_REST_UI_ENABLED)) { + installWebUI() + } } private def installWebUI(): Unit = {