org.apache.hadoop.yarn.webapp.WebAppException.<init>()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(5.7k)|赞(0)|评价(0)|浏览(92)

本文整理了Java中org.apache.hadoop.yarn.webapp.WebAppException.<init>()方法的一些代码示例,展示了WebAppException.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebAppException.<init>()方法的具体详情如下:
包路径:org.apache.hadoop.yarn.webapp.WebAppException
类名称:WebAppException
方法名:<init>

WebAppException.<init>介绍

暂无

代码示例

代码示例来源:origin: Qihoo360/XLearning

  1. + httpServer.getConnectorAddress(0).getPort());
  2. } catch (IOException e) {
  3. throw new WebAppException("Error starting http server", e);

代码示例来源:origin: Qihoo360/XLearning

  1. + httpServer.getConnectorAddress(0).getPort());
  2. } catch (IOException e) {
  3. throw new WebAppException("Error starting http server", e);
  4. .at(NetUtils.getHostPortString(bindAddress)).start(webApp);
  5. } catch (WebAppException e){
  6. throw new WebAppException("Error starting http server", e);
  7. } catch (Exception e){
  8. throw new WebAppException("Error start http server. For more detail", e);

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-common

  1. protected PrintWriter writer() {
  2. try {
  3. return response().getWriter();
  4. } catch (Exception e) {
  5. throw new WebAppException(e);
  6. }
  7. }
  8. }

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-common

  1. public PrintWriter writer() {
  2. try {
  3. return response().getWriter();
  4. } catch (IOException e) {
  5. throw new WebAppException(e);
  6. }
  7. }

代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-common

  1. public PrintWriter writer() {
  2. try {
  3. return response().getWriter();
  4. } catch (IOException e) {
  5. throw new WebAppException(e);
  6. }
  7. }

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-common

  1. public ServletOutputStream outputStream() {
  2. try {
  3. return response().getOutputStream();
  4. } catch (IOException e) {
  5. throw new WebAppException(e);
  6. }
  7. }

代码示例来源:origin: org.apache.tez/tez-dag

  1. void sendErrorResponse(int sc, String msg, Exception e) {
  2. if (LOG.isDebugEnabled()) {
  3. LOG.debug(msg, e);
  4. }
  5. try {
  6. response().sendError(sc, msg);
  7. } catch (IOException e1) {
  8. throw new WebAppException(e);
  9. }
  10. }

代码示例来源:origin: com.github.jiayuhan-it/hadoop-yarn-common

  1. protected PrintWriter writer() {
  2. try {
  3. return response().getWriter();
  4. } catch (Exception e) {
  5. throw new WebAppException(e);
  6. }
  7. }
  8. }

代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-common

  1. protected PrintWriter writer() {
  2. try {
  3. return response().getWriter();
  4. } catch (Exception e) {
  5. throw new WebAppException(e);
  6. }
  7. }
  8. }

代码示例来源:origin: com.github.jiayuhan-it/hadoop-yarn-common

  1. public void stop() {
  2. try {
  3. checkNotNull(httpServer, "httpServer").stop();
  4. checkNotNull(guiceFilter, "guiceFilter").destroy();
  5. }
  6. catch (Exception e) {
  7. throw new WebAppException(e);
  8. }
  9. }

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-common

  1. HttpServletResponse createResponse() {
  2. try {
  3. HttpServletResponse res = mock(HttpServletResponse.class);
  4. when(res.getWriter()).thenReturn(writer);
  5. return res;
  6. } catch (Exception e) {
  7. throw new WebAppException(e);
  8. }
  9. }
  10. });

代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-common

  1. HttpServletResponse createResponse() {
  2. try {
  3. HttpServletResponse res = mock(HttpServletResponse.class);
  4. when(res.getWriter()).thenReturn(writer);
  5. return res;
  6. } catch (Exception e) {
  7. throw new WebAppException(e);
  8. }
  9. }
  10. });

代码示例来源:origin: io.hops/hadoop-yarn-common

  1. HttpServletResponse createResponse() {
  2. try {
  3. HttpServletResponse res = mock(HttpServletResponse.class);
  4. when(res.getWriter()).thenReturn(writer);
  5. return res;
  6. } catch (Exception e) {
  7. throw new WebAppException(e);
  8. }
  9. }
  10. });

代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-common

  1. public WebApp start(WebApp webapp) {
  2. WebApp webApp = build(webapp);
  3. HttpServer2 httpServer = webApp.httpServer();
  4. try {
  5. httpServer.start();
  6. LOG.info("Web app " + name + " started at "
  7. + httpServer.getConnectorAddress(0).getPort());
  8. } catch (IOException e) {
  9. throw new WebAppException("Error starting http server", e);
  10. }
  11. return webApp;
  12. }

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-common

  1. /**
  2. * Render a sub-view
  3. * @param cls the class of the sub-view
  4. */
  5. public void render(Class<? extends SubView> cls) {
  6. int saved = context().nestLevel;
  7. getInstance(cls).renderPartial();
  8. if (context().nestLevel != saved) {
  9. throw new WebAppException("View "+ cls.getSimpleName() +" not complete");
  10. }
  11. }
  12. }

代码示例来源:origin: io.hops/hadoop-yarn-common

  1. public static <T> Injector testController(Class<? extends Controller> ctrlr,
  2. String methodName, Class<T> api, T impl, Module... modules) {
  3. try {
  4. Injector injector = createMockInjector(api, impl, modules);
  5. Method method = ctrlr.getMethod(methodName, (Class<?>[])null);
  6. method.invoke(injector.getInstance(ctrlr), (Object[])null);
  7. return injector;
  8. } catch (Exception e) {
  9. throw new WebAppException(e);
  10. }
  11. }

代码示例来源:origin: com.github.jiayuhan-it/hadoop-yarn-common

  1. /**
  2. * Render a sub-view
  3. * @param cls the class of the sub-view
  4. */
  5. public void render(Class<? extends SubView> cls) {
  6. int saved = context().nestLevel;
  7. getInstance(cls).renderPartial();
  8. if (context().nestLevel != saved) {
  9. throw new WebAppException("View "+ cls.getSimpleName() +" not complete");
  10. }
  11. }
  12. }

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-common

  1. public static <T> Injector testController(Class<? extends Controller> ctrlr,
  2. String methodName, Class<T> api, T impl, Module... modules) {
  3. try {
  4. Injector injector = createMockInjector(api, impl, modules);
  5. Method method = ctrlr.getMethod(methodName, (Class<?>[])null);
  6. method.invoke(injector.getInstance(ctrlr), (Object[])null);
  7. return injector;
  8. } catch (Exception e) {
  9. throw new WebAppException(e);
  10. }
  11. }

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-common

  1. @Override
  2. public void render() {
  3. int nestLevel = context().nestLevel();
  4. LOG.debug("Rendering {} @{}", getClass(), nestLevel);
  5. render(block());
  6. if (block.nestLevel() != nestLevel) {
  7. throw new WebAppException("Error rendering block: nestLevel="+
  8. block.nestLevel() +" expected "+ nestLevel);
  9. }
  10. context().set(nestLevel, block.wasInline());
  11. }

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-common

  1. @Override
  2. public void render() {
  3. putWithoutEscapeHtml(DOCTYPE);
  4. render(page().html().meta_http("X-UA-Compatible", "IE=8")
  5. .meta_http("Content-type", MimeType.HTML));
  6. if (page().nestLevel() != 0) {
  7. throw new WebAppException("Error rendering page: nestLevel="+
  8. page().nestLevel());
  9. }
  10. }

相关文章