diff --git a/llap-server/src/java/org/apache/hadoop/hive/llap/daemon/impl/LlapDaemon.java b/llap-server/src/java/org/apache/hadoop/hive/llap/daemon/impl/LlapDaemon.java index 940be0ec5b..b4e3f8b052 100644 --- a/llap-server/src/java/org/apache/hadoop/hive/llap/daemon/impl/LlapDaemon.java +++ b/llap-server/src/java/org/apache/hadoop/hive/llap/daemon/impl/LlapDaemon.java @@ -313,7 +313,14 @@ public LlapDaemon(Configuration daemonConf, int numExecutors, long executorMemor // Not adding the registry as a service, since we need to control when it is initialized - conf used to pickup properties. this.registry = new LlapRegistryService(true); - if (HiveConf.getBoolVar(daemonConf, HiveConf.ConfVars.HIVE_IN_TEST)) { + // disable web UI in test mode until a specific port was configured + boolean webServicesDisabledInTest = + HiveConf.getBoolVar(daemonConf, HiveConf.ConfVars.HIVE_IN_TEST) && + Integer.valueOf(ConfVars.LLAP_DAEMON_WEB_PORT.getDefaultValue()) == webPort; + + if (webServicesDisabledInTest) { + LOG.info( "Web UI was disabled in test mode because hive.llap.daemon.web.port was not " + + "specified or has default value ({})", webPort ); this.webServices = null; } else { this.webServices = new LlapWebServices(webPort, this, registry);