本文整理了Java中org.apache.hadoop.yarn.webapp.WebAppException.<init>()
方法的一些代码示例,展示了WebAppException.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebAppException.<init>()
方法的具体详情如下:
包路径:org.apache.hadoop.yarn.webapp.WebAppException
类名称:WebAppException
方法名:<init>
暂无
代码示例来源:origin: Qihoo360/XLearning
+ httpServer.getConnectorAddress(0).getPort());
} catch (IOException e) {
throw new WebAppException("Error starting http server", e);
代码示例来源:origin: Qihoo360/XLearning
+ httpServer.getConnectorAddress(0).getPort());
} catch (IOException e) {
throw new WebAppException("Error starting http server", e);
.at(NetUtils.getHostPortString(bindAddress)).start(webApp);
} catch (WebAppException e){
throw new WebAppException("Error starting http server", e);
} catch (Exception e){
throw new WebAppException("Error start http server. For more detail", e);
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-common
protected PrintWriter writer() {
try {
return response().getWriter();
} catch (Exception e) {
throw new WebAppException(e);
}
}
}
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-common
public PrintWriter writer() {
try {
return response().getWriter();
} catch (IOException e) {
throw new WebAppException(e);
}
}
代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-common
public PrintWriter writer() {
try {
return response().getWriter();
} catch (IOException e) {
throw new WebAppException(e);
}
}
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-common
public ServletOutputStream outputStream() {
try {
return response().getOutputStream();
} catch (IOException e) {
throw new WebAppException(e);
}
}
代码示例来源:origin: org.apache.tez/tez-dag
void sendErrorResponse(int sc, String msg, Exception e) {
if (LOG.isDebugEnabled()) {
LOG.debug(msg, e);
}
try {
response().sendError(sc, msg);
} catch (IOException e1) {
throw new WebAppException(e);
}
}
代码示例来源:origin: com.github.jiayuhan-it/hadoop-yarn-common
protected PrintWriter writer() {
try {
return response().getWriter();
} catch (Exception e) {
throw new WebAppException(e);
}
}
}
代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-common
protected PrintWriter writer() {
try {
return response().getWriter();
} catch (Exception e) {
throw new WebAppException(e);
}
}
}
代码示例来源:origin: com.github.jiayuhan-it/hadoop-yarn-common
public void stop() {
try {
checkNotNull(httpServer, "httpServer").stop();
checkNotNull(guiceFilter, "guiceFilter").destroy();
}
catch (Exception e) {
throw new WebAppException(e);
}
}
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-common
HttpServletResponse createResponse() {
try {
HttpServletResponse res = mock(HttpServletResponse.class);
when(res.getWriter()).thenReturn(writer);
return res;
} catch (Exception e) {
throw new WebAppException(e);
}
}
});
代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-common
HttpServletResponse createResponse() {
try {
HttpServletResponse res = mock(HttpServletResponse.class);
when(res.getWriter()).thenReturn(writer);
return res;
} catch (Exception e) {
throw new WebAppException(e);
}
}
});
代码示例来源:origin: io.hops/hadoop-yarn-common
HttpServletResponse createResponse() {
try {
HttpServletResponse res = mock(HttpServletResponse.class);
when(res.getWriter()).thenReturn(writer);
return res;
} catch (Exception e) {
throw new WebAppException(e);
}
}
});
代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-common
public WebApp start(WebApp webapp) {
WebApp webApp = build(webapp);
HttpServer2 httpServer = webApp.httpServer();
try {
httpServer.start();
LOG.info("Web app " + name + " started at "
+ httpServer.getConnectorAddress(0).getPort());
} catch (IOException e) {
throw new WebAppException("Error starting http server", e);
}
return webApp;
}
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-common
/**
* Render a sub-view
* @param cls the class of the sub-view
*/
public void render(Class<? extends SubView> cls) {
int saved = context().nestLevel;
getInstance(cls).renderPartial();
if (context().nestLevel != saved) {
throw new WebAppException("View "+ cls.getSimpleName() +" not complete");
}
}
}
代码示例来源:origin: io.hops/hadoop-yarn-common
public static <T> Injector testController(Class<? extends Controller> ctrlr,
String methodName, Class<T> api, T impl, Module... modules) {
try {
Injector injector = createMockInjector(api, impl, modules);
Method method = ctrlr.getMethod(methodName, (Class<?>[])null);
method.invoke(injector.getInstance(ctrlr), (Object[])null);
return injector;
} catch (Exception e) {
throw new WebAppException(e);
}
}
代码示例来源:origin: com.github.jiayuhan-it/hadoop-yarn-common
/**
* Render a sub-view
* @param cls the class of the sub-view
*/
public void render(Class<? extends SubView> cls) {
int saved = context().nestLevel;
getInstance(cls).renderPartial();
if (context().nestLevel != saved) {
throw new WebAppException("View "+ cls.getSimpleName() +" not complete");
}
}
}
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-common
public static <T> Injector testController(Class<? extends Controller> ctrlr,
String methodName, Class<T> api, T impl, Module... modules) {
try {
Injector injector = createMockInjector(api, impl, modules);
Method method = ctrlr.getMethod(methodName, (Class<?>[])null);
method.invoke(injector.getInstance(ctrlr), (Object[])null);
return injector;
} catch (Exception e) {
throw new WebAppException(e);
}
}
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-common
@Override
public void render() {
int nestLevel = context().nestLevel();
LOG.debug("Rendering {} @{}", getClass(), nestLevel);
render(block());
if (block.nestLevel() != nestLevel) {
throw new WebAppException("Error rendering block: nestLevel="+
block.nestLevel() +" expected "+ nestLevel);
}
context().set(nestLevel, block.wasInline());
}
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-common
@Override
public void render() {
putWithoutEscapeHtml(DOCTYPE);
render(page().html().meta_http("X-UA-Compatible", "IE=8")
.meta_http("Content-type", MimeType.HTML));
if (page().nestLevel() != 0) {
throw new WebAppException("Error rendering page: nestLevel="+
page().nestLevel());
}
}
内容来源于网络,如有侵权,请联系作者删除!