Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
public class WebAppException extends YarnRuntimeException {

private static final long serialVersionUID = 1L;
private WebApp webApp;

public WebApp getWebApp() {
return webApp;
}

public WebAppException(String msg) {
super(msg);
Expand All @@ -35,6 +40,11 @@ public WebAppException(Throwable cause) {
}

public WebAppException(String msg, Throwable cause) {
this(msg, cause, null);
}

public WebAppException(String msg, Throwable cause, WebApp webApp) {
super(msg, cause);
this.webApp = webApp;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ public WebApp start(WebApp webapp, WebAppContext ui2Context) {
LOG.info("Web app " + name + " started at "
+ httpServer.getConnectorAddress(0).getPort());
} catch (IOException e) {
throw new WebAppException("Error starting http server", e);
throw new WebAppException("Error starting http server", e, webApp);
}
return webApp;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import com.sun.jersey.spi.container.servlet.ServletContainer;

import org.apache.hadoop.yarn.metrics.GenericEventTypeMetrics;
import org.apache.hadoop.yarn.webapp.WebAppException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.Marker;
Expand Down Expand Up @@ -1440,7 +1441,12 @@ protected void startWepApp() {
IsResourceManagerActiveServlet.PATH_SPEC,
IsResourceManagerActiveServlet.class);

webApp = builder.start(new RMWebApp(this), uiWebAppContext);
try {
webApp = builder.start(new RMWebApp(this), uiWebAppContext);
} catch (WebAppException e) {
webApp = e.getWebApp();
throw e;
}
}

private String getWebAppsPath(String appName) {
Expand Down