• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java GenericExceptionHandler类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.hadoop.yarn.webapp.GenericExceptionHandler的典型用法代码示例。如果您正苦于以下问题:Java GenericExceptionHandler类的具体用法?Java GenericExceptionHandler怎么用?Java GenericExceptionHandler使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



GenericExceptionHandler类属于org.apache.hadoop.yarn.webapp包,在下文中一共展示了GenericExceptionHandler类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: setup

import org.apache.hadoop.yarn.webapp.GenericExceptionHandler; //导入依赖的package包/类
@Override
public void setup() {
  bind(NMWebServices.class);
  bind(GenericExceptionHandler.class);
  bind(JAXBContextResolver.class);
  bind(ResourceView.class).toInstance(this.resourceView);
  bind(ApplicationACLsManager.class).toInstance(this.aclsManager);
  bind(LocalDirsHandlerService.class).toInstance(dirsHandler);
  route("/", NMController.class, "info");
  route("/node", NMController.class, "node");
  route("/allApplications", NMController.class, "allApplications");
  route("/allContainers", NMController.class, "allContainers");
  route(pajoin("/application", APPLICATION_ID), NMController.class,
      "application");
  route(pajoin("/container", CONTAINER_ID), NMController.class,
      "container");
  route(
      pajoin("/containerlogs", CONTAINER_ID, APP_OWNER, CONTAINER_LOG_TYPE),
      NMController.class, "logs");
}
 
开发者ID:naver,项目名称:hadoop,代码行数:21,代码来源:WebServer.java


示例2: setup

import org.apache.hadoop.yarn.webapp.GenericExceptionHandler; //导入依赖的package包/类
@Override
public void setup() {
  bind(JAXBContextResolver.class);
  bind(RMWebServices.class);
  bind(GenericExceptionHandler.class);
  bind(RMWebApp.class).toInstance(this);

  if (rm != null) {
    bind(ResourceManager.class).toInstance(rm);
    bind(ApplicationBaseProtocol.class).toInstance(rm.getClientRMService());
  }
  route("/", RmController.class);
  route(pajoin("/nodes", NODE_STATE), RmController.class, "nodes");
  route(pajoin("/apps", APP_STATE), RmController.class);
  route("/cluster", RmController.class, "about");
  route(pajoin("/app", APPLICATION_ID), RmController.class, "app");
  route("/scheduler", RmController.class, "scheduler");
  route(pajoin("/queue", QUEUE_NAME), RmController.class, "queue");
  route("/nodelabels", RmController.class, "nodelabels");
  route(pajoin("/appattempt", APPLICATION_ATTEMPT_ID), RmController.class,
    "appattempt");
  route(pajoin("/container", CONTAINER_ID), RmController.class, "container");
}
 
开发者ID:naver,项目名称:hadoop,代码行数:24,代码来源:RMWebApp.java


示例3: configureServlets

import org.apache.hadoop.yarn.webapp.GenericExceptionHandler; //导入依赖的package包/类
@Override
protected void configureServlets() {
  bind(JAXBContextResolver.class);
  bind(RMWebServices.class);
  bind(GenericExceptionHandler.class);
  try {
    userName = UserGroupInformation.getCurrentUser().getShortUserName();
  } catch (IOException ioe) {
    throw new RuntimeException("Unable to get current user name "
        + ioe.getMessage(), ioe);
  }
  notUserName = userName + "abc123";
  conf = new YarnConfiguration();
  conf.set(YarnConfiguration.YARN_ADMIN_ACL, userName);
  rm = new MockRM(conf);
  bind(ResourceManager.class).toInstance(rm);
  filter("/*").through(
      TestRMWebServicesAppsModification.TestRMCustomAuthFilter.class);
  serve("/*").with(GuiceContainer.class);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:21,代码来源:TestRMWebServicesNodeLabels.java


示例4: configureServlets

import org.apache.hadoop.yarn.webapp.GenericExceptionHandler; //导入依赖的package包/类
@Override
protected void configureServlets() {
  bind(JAXBContextResolver.class);
  bind(RMWebServices.class);
  bind(GenericExceptionHandler.class);
  Configuration rmconf = new Configuration();
  rmconf.setInt(YarnConfiguration.RM_AM_MAX_ATTEMPTS,
    YarnConfiguration.DEFAULT_RM_AM_MAX_ATTEMPTS);
  rmconf.setClass(YarnConfiguration.RM_SCHEDULER, FifoScheduler.class,
    ResourceScheduler.class);
  rmconf.setBoolean(YarnConfiguration.YARN_ACL_ENABLE, true);
  rm = new MockRM(rmconf);
  bind(ResourceManager.class).toInstance(rm);
  if (isKerberosAuth == true) {
    filter("/*").through(TestKerberosAuthFilter.class);
  } else {
    filter("/*").through(TestSimpleAuthFilter.class);
  }
  serve("/*").with(GuiceContainer.class);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:21,代码来源:TestRMWebServicesDelegationTokens.java


示例5: setup

import org.apache.hadoop.yarn.webapp.GenericExceptionHandler; //导入依赖的package包/类
@Override
public void setup() {
  bind(YarnJacksonJaxbJsonProvider.class);
  bind(AHSWebServices.class);
  bind(TimelineWebServices.class);
  bind(GenericExceptionHandler.class);
  bind(ApplicationBaseProtocol.class).toInstance(historyClientService);
  bind(TimelineDataManager.class).toInstance(timelineDataManager);
  route("/", AHSController.class);
  route(pajoin("/apps", APP_STATE), AHSController.class);
  route(pajoin("/app", APPLICATION_ID), AHSController.class, "app");
  route(pajoin("/appattempt", APPLICATION_ATTEMPT_ID), AHSController.class,
    "appattempt");
  route(pajoin("/container", CONTAINER_ID), AHSController.class, "container");
  route(
    pajoin("/logs", NM_NODENAME, CONTAINER_ID, ENTITY_STRING, APP_OWNER,
      CONTAINER_LOG_TYPE), AHSController.class, "logs");
}
 
开发者ID:naver,项目名称:hadoop,代码行数:19,代码来源:AHSWebApp.java


示例6: setup

import org.apache.hadoop.yarn.webapp.GenericExceptionHandler; //导入依赖的package包/类
@Override
public void setup() {
  bind(JAXBContextResolver.class);
  bind(GenericExceptionHandler.class);
  bind(AMWebServices.class);
  route("/", AppController.class);
  route("/app", AppController.class);
  route(pajoin("/job", JOB_ID), AppController.class, "job");
  route(pajoin("/conf", JOB_ID), AppController.class, "conf");
  route(pajoin("/jobcounters", JOB_ID), AppController.class, "jobCounters");
  route(pajoin("/singlejobcounter",JOB_ID, COUNTER_GROUP, COUNTER_NAME),
      AppController.class, "singleJobCounter");
  route(pajoin("/tasks", JOB_ID, TASK_TYPE, TASK_STATE), AppController.class, "tasks");
  route(pajoin("/attempts", JOB_ID, TASK_TYPE, ATTEMPT_STATE),
      AppController.class, "attempts");
  route(pajoin("/task", TASK_ID), AppController.class, "task");
  route(pajoin("/taskcounters", TASK_ID), AppController.class, "taskCounters");
  route(pajoin("/singletaskcounter",TASK_ID, COUNTER_GROUP, COUNTER_NAME),
      AppController.class, "singleTaskCounter");
}
 
开发者ID:naver,项目名称:hadoop,代码行数:21,代码来源:AMWebApp.java


示例7: configureServlets

import org.apache.hadoop.yarn.webapp.GenericExceptionHandler; //导入依赖的package包/类
@Override
protected void configureServlets() {

  appContext = new MockHistoryContext(0, 1, 2, 1);
  webApp = mock(HsWebApp.class);
  when(webApp.name()).thenReturn("hsmockwebapp");

  bind(JAXBContextResolver.class);
  bind(HsWebServices.class);
  bind(GenericExceptionHandler.class);
  bind(WebApp.class).toInstance(webApp);
  bind(AppContext.class).toInstance(appContext);
  bind(HistoryContext.class).toInstance(appContext);
  bind(Configuration.class).toInstance(conf);

  serve("/*").with(GuiceContainer.class);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:18,代码来源:TestHsWebServicesAttempts.java


示例8: configureServlets

import org.apache.hadoop.yarn.webapp.GenericExceptionHandler; //导入依赖的package包/类
@Override
protected void configureServlets() {

  appContext = new MockHistoryContext(0, 1, 1, 1);
  JobHistory jobHistoryService = new JobHistory();
  HistoryContext historyContext = (HistoryContext) jobHistoryService;
  webApp = new HsWebApp(historyContext);

  bind(JAXBContextResolver.class);
  bind(HsWebServices.class);
  bind(GenericExceptionHandler.class);
  bind(WebApp.class).toInstance(webApp);
  bind(AppContext.class).toInstance(appContext);
  bind(HistoryContext.class).toInstance(appContext);
  bind(Configuration.class).toInstance(conf);

  serve("/*").with(GuiceContainer.class);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:19,代码来源:TestHsWebServices.java


示例9: configureServlets

import org.apache.hadoop.yarn.webapp.GenericExceptionHandler; //导入依赖的package包/类
@Override
protected void configureServlets() {

  appContext = new MockHistoryContext(0, 1, 2, 1, false);
  webApp = mock(HsWebApp.class);
  when(webApp.name()).thenReturn("hsmockwebapp");

  bind(JAXBContextResolver.class);
  bind(HsWebServices.class);
  bind(GenericExceptionHandler.class);
  bind(WebApp.class).toInstance(webApp);
  bind(AppContext.class).toInstance(appContext);
  bind(HistoryContext.class).toInstance(appContext);
  bind(Configuration.class).toInstance(conf);

  serve("/*").with(GuiceContainer.class);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:18,代码来源:TestHsWebServicesJobs.java


示例10: configureServlets

import org.apache.hadoop.yarn.webapp.GenericExceptionHandler; //导入依赖的package包/类
@Override
protected void configureServlets() {

  appContext = new MockHistoryContext(3, 2, 1);
  webApp = mock(HsWebApp.class);
  when(webApp.name()).thenReturn("hsmockwebapp");

  bind(JAXBContextResolver.class);
  bind(HsWebServices.class);
  bind(GenericExceptionHandler.class);
  bind(WebApp.class).toInstance(webApp);
  bind(AppContext.class).toInstance(appContext);
  bind(HistoryContext.class).toInstance(appContext);
  bind(Configuration.class).toInstance(conf);

  serve("/*").with(GuiceContainer.class);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:18,代码来源:TestHsWebServicesJobsQuery.java


示例11: setup

import org.apache.hadoop.yarn.webapp.GenericExceptionHandler; //导入依赖的package包/类
@Override
public void setup() {
  bind(NMWebServices.class);
  bind(GenericExceptionHandler.class);
  bind(JAXBContextResolver.class);
  bind(ResourceView.class).toInstance(this.resourceView);
  bind(ApplicationACLsManager.class).toInstance(this.aclsManager);
  bind(LocalDirsHandlerService.class).toInstance(dirsHandler);
  route("/", NMController.class, "info");
  route("/node", NMController.class, "node");
  route("/allApplications", NMController.class, "allApplications");
  route("/allContainers", NMController.class, "allContainers");
  route(pajoin("/application", APPLICATION_ID), NMController.class,
      "application");
  route(pajoin("/container", CONTAINER_ID), NMController.class,
      "container");
  route(
      pajoin("/containerlogs", CONTAINER_ID, APP_OWNER, CONTAINER_LOG_TYPE),
      NMController.class, "logs");
  route("/errors-and-warnings", NMController.class, "errorsAndWarnings");
}
 
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:22,代码来源:WebServer.java


示例12: setup

import org.apache.hadoop.yarn.webapp.GenericExceptionHandler; //导入依赖的package包/类
@Override
public void setup() {
  bind(JAXBContextResolver.class);
  bind(RMWebServices.class);
  bind(GenericExceptionHandler.class);
  bind(RMWebApp.class).toInstance(this);

  if (rm != null) {
    bind(ResourceManager.class).toInstance(rm);
    bind(ApplicationBaseProtocol.class).toInstance(rm.getClientRMService());
  }
  route("/", RmController.class);
  route(pajoin("/nodes", NODE_STATE), RmController.class, "nodes");
  route(pajoin("/apps", APP_STATE), RmController.class);
  route("/cluster", RmController.class, "about");
  route(pajoin("/app", APPLICATION_ID), RmController.class, "app");
  route("/scheduler", RmController.class, "scheduler");
  route(pajoin("/queue", QUEUE_NAME), RmController.class, "queue");
  route("/nodelabels", RmController.class, "nodelabels");
  route(pajoin("/appattempt", APPLICATION_ATTEMPT_ID), RmController.class,
    "appattempt");
  route(pajoin("/container", CONTAINER_ID), RmController.class, "container");
  route("/errors-and-warnings", RmController.class, "errorsAndWarnings");
  route(pajoin("/logaggregationstatus", APPLICATION_ID),
    RmController.class, "logaggregationstatus");
}
 
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:27,代码来源:RMWebApp.java


示例13: configureServlets

import org.apache.hadoop.yarn.webapp.GenericExceptionHandler; //导入依赖的package包/类
@Override
protected void configureServlets() {
  bind(JAXBContextResolver.class);
  try {
    userName = UserGroupInformation.getCurrentUser().getShortUserName();
  } catch (IOException ioe) {
    throw new RuntimeException("Unable to get current user name "
        + ioe.getMessage(), ioe);
  }
  notUserName = userName + "abc123";
  conf = new YarnConfiguration();
  conf.set(YarnConfiguration.YARN_ADMIN_ACL, userName);
  rm = new MockRM(conf);
  rmWebService = new RMWebServices(rm,conf);
  bind(RMWebServices.class).toInstance(rmWebService);
  bind(GenericExceptionHandler.class);
  bind(ResourceManager.class).toInstance(rm);
  filter("/*").through(
      TestRMWebServicesAppsModification.TestRMCustomAuthFilter.class);
  serve("/*").with(GuiceContainer.class);
}
 
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:22,代码来源:TestRMWebServicesNodeLabels.java


示例14: setup

import org.apache.hadoop.yarn.webapp.GenericExceptionHandler; //导入依赖的package包/类
@Override
public void setup() {
  bind(YarnJacksonJaxbJsonProvider.class);
  bind(AHSWebServices.class);
  bind(TimelineWebServices.class);
  bind(GenericExceptionHandler.class);
  bind(ApplicationBaseProtocol.class).toInstance(historyClientService);
  bind(TimelineDataManager.class).toInstance(timelineDataManager);
  route("/", AHSController.class);
  route("/about", AHSController.class, "about");
  route(pajoin("/apps", APP_STATE), AHSController.class);
  route(pajoin("/app", APPLICATION_ID), AHSController.class, "app");
  route(pajoin("/appattempt", APPLICATION_ATTEMPT_ID), AHSController.class,
    "appattempt");
  route(pajoin("/container", CONTAINER_ID), AHSController.class, "container");
  route(
    pajoin("/logs", NM_NODENAME, CONTAINER_ID, ENTITY_STRING, APP_OWNER,
      CONTAINER_LOG_TYPE), AHSController.class, "logs");
  route("/errors-and-warnings", AHSController.class, "errorsAndWarnings");
}
 
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:21,代码来源:AHSWebApp.java


示例15: configureServlets

import org.apache.hadoop.yarn.webapp.GenericExceptionHandler; //导入依赖的package包/类
@Override
protected void configureServlets()
{
  LogicalPlan dag = new LogicalPlan();
  String workingDir = new File("target", StramWebServicesTest.class.getName()).getAbsolutePath();
  dag.setAttribute(LogicalPlan.APPLICATION_PATH, workingDir);
  dag.setAttribute(Context.OperatorContext.STORAGE_AGENT, new AsyncFSStorageAgent(workingDir, null));
  dag.setAttribute(LogicalPlan.METRICS_TRANSPORT, new AutoMetricBuiltInTransport("xyz"));
  final DummyStreamingContainerManager streamingContainerManager = new DummyStreamingContainerManager(dag);

  appContext = new TestAppContext(dag.getAttributes());
  bind(JAXBContextResolver.class);
  bind(StramWebServices.class);
  bind(GenericExceptionHandler.class);
  bind(StramAppContext.class).toInstance(appContext);
  bind(StreamingContainerManager.class).toInstance(streamingContainerManager);
  bind(Configuration.class).toInstance(conf);
  serve("/*").with(GuiceContainer.class);
}
 
开发者ID:apache,项目名称:apex-core,代码行数:20,代码来源:StramWebServicesTest.java


示例16: setup

import org.apache.hadoop.yarn.webapp.GenericExceptionHandler; //导入依赖的package包/类
@Override
public void setup() {
  bind(JAXBContextResolver.class);
  bind(RMWebServices.class);
  bind(GenericExceptionHandler.class);
  bind(RMWebApp.class).toInstance(this);

  if (rm != null) {
    bind(ResourceManager.class).toInstance(rm);
    bind(RMContext.class).toInstance(rm.getRMContext());
    bind(ApplicationACLsManager.class).toInstance(
        rm.getApplicationACLsManager());
    bind(QueueACLsManager.class).toInstance(rm.getQueueACLsManager());
  }
  route("/", RmController.class);
  route(pajoin("/nodes", NODE_STATE), RmController.class, "nodes");
  route(pajoin("/apps", APP_STATE), RmController.class);
  route("/cluster", RmController.class, "about");
  route(pajoin("/app", APPLICATION_ID), RmController.class, "app");
  route("/scheduler", RmController.class, "scheduler");
  route(pajoin("/queue", QUEUE_NAME), RmController.class, "queue");
}
 
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:23,代码来源:RMWebApp.java


示例17: configureServlets

import org.apache.hadoop.yarn.webapp.GenericExceptionHandler; //导入依赖的package包/类
@Override
protected void configureServlets() {
  bind(JAXBContextResolver.class);
  bind(RMWebServices.class);
  bind(GenericExceptionHandler.class);
  try {
    userName = UserGroupInformation.getCurrentUser().getShortUserName();
  } catch (IOException ioe) {
    throw new RuntimeException("Unable to get current user name "
        + ioe.getMessage(), ioe);
  }
  notUserName = userName + "abc123";
  conf = new YarnConfiguration();
  conf.set(YarnConfiguration.YARN_ADMIN_ACL, userName);
  rm = new MockRM(conf);
  bind(ResourceManager.class).toInstance(rm);
  bind(RMContext.class).toInstance(rm.getRMContext());
  filter("/*").through(
      TestRMWebServicesAppsModification.TestRMCustomAuthFilter.class);
  serve("/*").with(GuiceContainer.class);
}
 
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:22,代码来源:TestRMWebServicesNodeLabels.java


示例18: configureServlets

import org.apache.hadoop.yarn.webapp.GenericExceptionHandler; //导入依赖的package包/类
@Override
protected void configureServlets() {
  bind(JAXBContextResolver.class);
  bind(RMWebServices.class);
  bind(GenericExceptionHandler.class);
  conf = new YarnConfiguration();
  conf.setClass(YarnConfiguration.RM_SCHEDULER, FairScheduler.class,
    ResourceScheduler.class);
  rm = new MockRM(conf);
  bind(ResourceManager.class).toInstance(rm);
  bind(RMContext.class).toInstance(rm.getRMContext());
  bind(ApplicationACLsManager.class).toInstance(
      rm.getApplicationACLsManager());
  bind(QueueACLsManager.class).toInstance(rm.getQueueACLsManager());
  serve("/*").with(GuiceContainer.class);
}
 
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:17,代码来源:TestRMWebServicesFairScheduler.java


示例19: configureServlets

import org.apache.hadoop.yarn.webapp.GenericExceptionHandler; //导入依赖的package包/类
@Override
protected void configureServlets() {
  bind(JAXBContextResolver.class);
  bind(RMWebServices.class);
  bind(GenericExceptionHandler.class);
  Configuration conf = new Configuration();
  conf.setClass(YarnConfiguration.RM_SCHEDULER, FifoScheduler.class,
      ResourceScheduler.class);
  rm = new MockRM(conf);
  bind(ResourceManager.class).toInstance(rm);
  bind(RMContext.class).toInstance(rm.getRMContext());
  bind(ApplicationACLsManager.class).toInstance(
      rm.getApplicationACLsManager());
  bind(QueueACLsManager.class).toInstance(rm.getQueueACLsManager());
  serve("/*").with(GuiceContainer.class);
}
 
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:17,代码来源:TestRMWebServices.java


示例20: configureServlets

import org.apache.hadoop.yarn.webapp.GenericExceptionHandler; //导入依赖的package包/类
@Override
protected void configureServlets() {
  bind(JAXBContextResolver.class);
  bind(RMWebServices.class);
  bind(GenericExceptionHandler.class);
  csConf = new CapacitySchedulerConfiguration();
  setupQueueConfiguration(csConf);
  conf = new YarnConfiguration(csConf);
  conf.setClass(YarnConfiguration.RM_SCHEDULER, CapacityScheduler.class,
  ResourceScheduler.class);
  rm = new MockRM(conf);
  bind(ResourceManager.class).toInstance(rm);
  bind(RMContext.class).toInstance(rm.getRMContext());
  bind(ApplicationACLsManager.class).toInstance(
      rm.getApplicationACLsManager());
  bind(QueueACLsManager.class).toInstance(rm.getQueueACLsManager());
  serve("/*").with(GuiceContainer.class);
}
 
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:19,代码来源:TestRMWebServicesCapacitySched.java



注:本文中的org.apache.hadoop.yarn.webapp.GenericExceptionHandler类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ParseException类代码示例发布时间:2022-05-21
下一篇:
Java ParticleEffect类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap