Skip to content

Commit

Permalink
Reflecting PR reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
tbonelee committed Sep 29, 2024
1 parent 0f394e3 commit bd701ac
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,6 @@ public class ZeppelinServer implements AutoCloseable {
private final Server jettyWebServer;
private final ServiceLocator sharedServiceLocator;
private final ConfigStorage storage;
private final String classicUiWebAppContextPath;
private final String newUiWebAppContextPath;

public ZeppelinServer(ZeppelinConfiguration zConf) throws IOException {
this(zConf, DEFAULT_SERVICE_LOCATOR_NAME);
Expand All @@ -160,13 +158,7 @@ public ZeppelinServer(ZeppelinConfiguration zConf, String serviceLocatorName) th
jettyWebServer = setupJettyServer();
sharedServiceLocator = ServiceLocatorFactory.getInstance().create(serviceLocatorName);
storage = ConfigStorage.createConfigStorage(zConf);
if (isNewUiDefault(zConf)) {
classicUiWebAppContextPath = NON_DEFAULT_CLASSIC_UI_WEB_APP_CONTEXT_PATH;
newUiWebAppContextPath = zConf.getServerContextPath();
} else {
classicUiWebAppContextPath = zConf.getServerContextPath();
newUiWebAppContextPath = NON_DEFAULT_NEW_UI_WEB_APP_CONTEXT_PATH;
}

}

public void startZeppelin() {
Expand Down Expand Up @@ -236,6 +228,15 @@ protected void configure() {
});

// Multiple Web UI
String classicUiWebAppContextPath;
String newUiWebAppContextPath;
if (isNewUiDefault(zConf)) {
classicUiWebAppContextPath = NON_DEFAULT_CLASSIC_UI_WEB_APP_CONTEXT_PATH;
newUiWebAppContextPath = zConf.getServerContextPath();
} else {
classicUiWebAppContextPath = zConf.getServerContextPath();
newUiWebAppContextPath = NON_DEFAULT_NEW_UI_WEB_APP_CONTEXT_PATH;
}
final WebAppContext newUiWebApp = setupWebAppContext(contexts, zConf, zConf.getString(ConfVars.ZEPPELIN_ANGULAR_WAR),
newUiWebAppContextPath);
final WebAppContext classicUiWebApp = setupWebAppContext(contexts, zConf, zConf.getString(ConfVars.ZEPPELIN_WAR),
Expand Down Expand Up @@ -345,7 +346,6 @@ private void initJMX() {
}
}
}

private void initMetrics() {
if (zConf.isJMXEnabled()) {
Metrics.addRegistry(new JmxMeterRegistry(JmxConfig.DEFAULT, Clock.SYSTEM));
Expand Down

0 comments on commit bd701ac

Please sign in to comment.