当前位置: 首页>>代码示例>>Java>>正文


Java YarnUncaughtExceptionHandler类代码示例

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


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

示例1: main

import org.apache.hadoop.yarn.YarnUncaughtExceptionHandler; //导入依赖的package包/类
public static void main(String[] args) {
  Thread.setDefaultUncaughtExceptionHandler(new YarnUncaughtExceptionHandler());
  StringUtils.startupShutdownMessage(SharedCacheManager.class, args, LOG);
  try {
    Configuration conf = new YarnConfiguration();
    SharedCacheManager sharedCacheManager = new SharedCacheManager();
    ShutdownHookManager.get().addShutdownHook(
        new CompositeServiceShutdownHook(sharedCacheManager),
        SHUTDOWN_HOOK_PRIORITY);
    sharedCacheManager.init(conf);
    sharedCacheManager.start();
  } catch (Throwable t) {
    LOG.fatal("Error starting SharedCacheManager", t);
    System.exit(-1);
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:17,代码来源:SharedCacheManager.java

示例2: main

import org.apache.hadoop.yarn.YarnUncaughtExceptionHandler; //导入依赖的package包/类
public static void main(String argv[]) {
  Thread.setDefaultUncaughtExceptionHandler(new YarnUncaughtExceptionHandler());
  StringUtils.startupShutdownMessage(ResourceManager.class, argv, LOG);
  try {
    Configuration conf = new YarnConfiguration();
    GenericOptionsParser hParser = new GenericOptionsParser(conf, argv);
    argv = hParser.getRemainingArgs();
    // If -format-state-store, then delete RMStateStore; else startup normally
    if (argv.length == 1 && argv[0].equals("-format-state-store")) {
      deleteRMStateStore(conf);
    } else {
      ResourceManager resourceManager = new ResourceManager();
      ShutdownHookManager.get().addShutdownHook(
        new CompositeServiceShutdownHook(resourceManager),
        SHUTDOWN_HOOK_PRIORITY);
      resourceManager.init(conf);
      resourceManager.start();
    }
  } catch (Throwable t) {
    LOG.fatal("Error starting ResourceManager", t);
    System.exit(-1);
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:24,代码来源:ResourceManager.java

示例3: launchAppHistoryServer

import org.apache.hadoop.yarn.YarnUncaughtExceptionHandler; //导入依赖的package包/类
static ApplicationHistoryServer launchAppHistoryServer(String[] args) {
  Thread
    .setDefaultUncaughtExceptionHandler(new YarnUncaughtExceptionHandler());
  StringUtils.startupShutdownMessage(ApplicationHistoryServer.class, args,
    LOG);
  ApplicationHistoryServer appHistoryServer = null;
  try {
    appHistoryServer = new ApplicationHistoryServer();
    ShutdownHookManager.get().addShutdownHook(
      new CompositeServiceShutdownHook(appHistoryServer),
      SHUTDOWN_HOOK_PRIORITY);
    YarnConfiguration conf = new YarnConfiguration();
    new GenericOptionsParser(conf, args);
    appHistoryServer.init(conf);
    appHistoryServer.start();
  } catch (Throwable t) {
    LOG.fatal("Error starting ApplicationHistoryServer", t);
    ExitUtil.terminate(-1, "Error starting ApplicationHistoryServer");
  }
  return appHistoryServer;
}
 
开发者ID:naver,项目名称:hadoop,代码行数:22,代码来源:ApplicationHistoryServer.java

示例4: launchJobHistoryServer

import org.apache.hadoop.yarn.YarnUncaughtExceptionHandler; //导入依赖的package包/类
static JobHistoryServer launchJobHistoryServer(String[] args) {
  Thread.
      setDefaultUncaughtExceptionHandler(new YarnUncaughtExceptionHandler());
  StringUtils.startupShutdownMessage(JobHistoryServer.class, args, LOG);
  JobHistoryServer jobHistoryServer = null;
  try {
    jobHistoryServer = new JobHistoryServer();
    ShutdownHookManager.get().addShutdownHook(
        new CompositeServiceShutdownHook(jobHistoryServer),
        SHUTDOWN_HOOK_PRIORITY);
    YarnConfiguration conf = new YarnConfiguration(new JobConf());
    new GenericOptionsParser(conf, args);
    jobHistoryServer.init(conf);
    jobHistoryServer.start();
  } catch (Throwable t) {
    LOG.fatal("Error starting JobHistoryServer", t);
    ExitUtil.terminate(-1, "Error starting JobHistoryServer");
  }
  return jobHistoryServer;
}
 
开发者ID:naver,项目名称:hadoop,代码行数:21,代码来源:JobHistoryServer.java

示例5: main

import org.apache.hadoop.yarn.YarnUncaughtExceptionHandler; //导入依赖的package包/类
public static void main(String argv[]) {

   Thread.setDefaultUncaughtExceptionHandler(new YarnUncaughtExceptionHandler());
   StringUtils.startupShutdownMessage(ResourceManager.class, argv, LOG);
   try {

     Configuration conf = new YarnConfiguration();
     GenericOptionsParser hParser = new GenericOptionsParser(conf, argv);
     argv = hParser.getRemainingArgs();
     // If -format-state-store, then delete RMStateStore; else startup normally
     if (argv.length == 1 && argv[0].equals("-format-state-store")) {
       deleteRMStateStore(conf);
     } else {
       ResourceManager resourceManager = new ResourceManager();
       ShutdownHookManager.get().addShutdownHook(
         new CompositeServiceShutdownHook(resourceManager),
         SHUTDOWN_HOOK_PRIORITY);
       resourceManager.init(conf);
       resourceManager.start();
     }
   } catch (Throwable t) {
     LOG.fatal("Error starting ResourceManager", t);
     System.exit(-1);
   }
   
 }
 
开发者ID:yncxcw,项目名称:big-c,代码行数:27,代码来源:ResourceManager.java

示例6: main

import org.apache.hadoop.yarn.YarnUncaughtExceptionHandler; //导入依赖的package包/类
public static void main(String argv[]) {
  Thread.setDefaultUncaughtExceptionHandler(new YarnUncaughtExceptionHandler());
  StringUtils.startupShutdownMessage(ResourceManager.class, argv, LOG);
  try {
    Configuration conf = new YarnConfiguration();
    // If -format-state-store, then delete RMStateStore; else startup normally
    if (argv.length == 1 && argv[0].equals("-format-state-store")) {
      deleteRMStateStore(conf);
    } else {
      ResourceManager resourceManager = new ResourceManager();
      ShutdownHookManager.get().addShutdownHook(
        new CompositeServiceShutdownHook(resourceManager),
        SHUTDOWN_HOOK_PRIORITY);
      resourceManager.init(conf);
      resourceManager.start();
    }
  } catch (Throwable t) {
    LOG.fatal("Error starting ResourceManager", t);
    System.exit(-1);
  }
}
 
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:22,代码来源:ResourceManager.java

示例7: launchAppHistoryServer

import org.apache.hadoop.yarn.YarnUncaughtExceptionHandler; //导入依赖的package包/类
static ApplicationHistoryServer launchAppHistoryServer(String[] args) {
  Thread
    .setDefaultUncaughtExceptionHandler(new YarnUncaughtExceptionHandler());
  StringUtils.startupShutdownMessage(ApplicationHistoryServer.class, args,
    LOG);
  ApplicationHistoryServer appHistoryServer = null;
  try {
    appHistoryServer = new ApplicationHistoryServer();
    ShutdownHookManager.get().addShutdownHook(
      new CompositeServiceShutdownHook(appHistoryServer),
      SHUTDOWN_HOOK_PRIORITY);
    YarnConfiguration conf = new YarnConfiguration();
    appHistoryServer.init(conf);
    appHistoryServer.start();
  } catch (Throwable t) {
    LOG.fatal("Error starting ApplicationHistoryServer", t);
    ExitUtil.terminate(-1, "Error starting ApplicationHistoryServer");
  }
  return appHistoryServer;
}
 
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:21,代码来源:ApplicationHistoryServer.java

示例8: launchJobHistoryServer

import org.apache.hadoop.yarn.YarnUncaughtExceptionHandler; //导入依赖的package包/类
static JobHistoryServer launchJobHistoryServer(String[] args) {
  Thread.
      setDefaultUncaughtExceptionHandler(new YarnUncaughtExceptionHandler());
  StringUtils.startupShutdownMessage(JobHistoryServer.class, args, LOG);
  JobHistoryServer jobHistoryServer = null;
  try {
    jobHistoryServer = new JobHistoryServer();
    ShutdownHookManager.get().addShutdownHook(
        new CompositeServiceShutdownHook(jobHistoryServer),
        SHUTDOWN_HOOK_PRIORITY);
    YarnConfiguration conf = new YarnConfiguration(new JobConf());
    jobHistoryServer.init(conf);
    jobHistoryServer.start();
  } catch (Throwable t) {
    LOG.fatal("Error starting JobHistoryServer", t);
    ExitUtil.terminate(-1, "Error starting JobHistoryServer");
  }
  return jobHistoryServer;
}
 
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:20,代码来源:JobHistoryServer.java

示例9: main

import org.apache.hadoop.yarn.YarnUncaughtExceptionHandler; //导入依赖的package包/类
public static void main(String[] args) {
  Thread.setDefaultUncaughtExceptionHandler(new YarnUncaughtExceptionHandler());
  StringUtils.startupShutdownMessage(WebAppProxyServer.class, args, LOG);
  try {
    WebAppProxyServer proxy = new WebAppProxyServer();
    ShutdownHookManager.get().addShutdownHook(
      new CompositeServiceShutdownHook(proxy),
      SHUTDOWN_HOOK_PRIORITY);
    YarnConfiguration conf = new YarnConfiguration();
    proxy.init(conf);
    proxy.start();
    proxy.join();
  } catch (Throwable t) {
    LOG.fatal("Error starting Proxy server", t);
    System.exit(-1);
  }
}
 
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:18,代码来源:WebAppProxyServer.java

示例10: main

import org.apache.hadoop.yarn.YarnUncaughtExceptionHandler; //导入依赖的package包/类
public static void main(String argv[]) {
  Thread.setDefaultUncaughtExceptionHandler(new YarnUncaughtExceptionHandler());
  StringUtils.startupShutdownMessage(ResourceManager.class, argv, LOG);
  try {
    Configuration conf = new YarnConfiguration();
    ResourceManager resourceManager = new ResourceManager();
    ShutdownHookManager.get().addShutdownHook(
      new CompositeServiceShutdownHook(resourceManager),
      SHUTDOWN_HOOK_PRIORITY);
    resourceManager.init(conf);
    resourceManager.start();
  } catch (Throwable t) {
    LOG.fatal("Error starting ResourceManager", t);
    System.exit(-1);
  }
}
 
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:17,代码来源:ResourceManager.java

示例11: main

import org.apache.hadoop.yarn.YarnUncaughtExceptionHandler; //导入依赖的package包/类
public static void main(String[] args) {
  Thread.setDefaultUncaughtExceptionHandler(new YarnUncaughtExceptionHandler());
  StringUtils.startupShutdownMessage(JobHistoryServer.class, args, LOG);
  try {
    JobHistoryServer jobHistoryServer = new JobHistoryServer();
    ShutdownHookManager.get().addShutdownHook(
        new CompositeServiceShutdownHook(jobHistoryServer),
        SHUTDOWN_HOOK_PRIORITY);
    YarnConfiguration conf = new YarnConfiguration(new JobConf());
    jobHistoryServer.init(conf);
    jobHistoryServer.start();
  } catch (Throwable t) {
    LOG.fatal("Error starting JobHistoryServer", t);
    System.exit(-1);
  }
}
 
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:17,代码来源:JobHistoryServer.java

示例12: main

import org.apache.hadoop.yarn.YarnUncaughtExceptionHandler; //导入依赖的package包/类
public static void main(String argv[]) {
  Thread.setDefaultUncaughtExceptionHandler(new YarnUncaughtExceptionHandler());
  StringUtils.startupShutdownMessage(ResourceManager.class, argv, LOG);
  try {
    Configuration conf = new YarnConfiguration();
    ResourceManager resourceManager = new ResourceManager();
    ShutdownHookManager.get().addShutdownHook(
      new CompositeServiceShutdownHook(resourceManager),
      SHUTDOWN_HOOK_PRIORITY);
    setHttpPolicy(conf);
    resourceManager.init(conf);
    resourceManager.start();
  } catch (Throwable t) {
    LOG.fatal("Error starting ResourceManager", t);
    System.exit(-1);
  }
}
 
开发者ID:chendave,项目名称:hadoop-TCP,代码行数:18,代码来源:ResourceManager.java

示例13: serviceMain

import org.apache.hadoop.yarn.YarnUncaughtExceptionHandler; //导入依赖的package包/类
/**
 * The real main function, which takes the arguments as a list
 * arg 0 must be the service classname
 * @param argsList the list of arguments
 */
public static void serviceMain(List<String> argsList) {
  if (argsList.isEmpty()) {
    exitWithMessage(EXIT_USAGE, USAGE_MESSAGE);
  } else {
    String serviceClassName = argsList.get(0);

    if (LOG.isDebugEnabled()) {
      LOG.debug(startupShutdownMessage(serviceClassName, argsList));
      StringBuilder builder = new StringBuilder();
      for (String arg : argsList) {
        builder.append('"').append(arg).append("\" ");
      }
      LOG.debug(builder.toString());
    }
    Thread.setDefaultUncaughtExceptionHandler(
      new YarnUncaughtExceptionHandler());

    ServiceLauncher serviceLauncher = new ServiceLauncher<Service>(serviceClassName);
    serviceLauncher.launchServiceAndExit(argsList);
  }
}
 
开发者ID:apache,项目名称:incubator-slider,代码行数:27,代码来源:ServiceLauncher.java

示例14: main

import org.apache.hadoop.yarn.YarnUncaughtExceptionHandler; //导入依赖的package包/类
public static void main(String[] args) {
  Thread.setDefaultUncaughtExceptionHandler(new YarnUncaughtExceptionHandler());
  StringUtils.startupShutdownMessage(WebAppProxyServer.class, args, LOG);
  try {
    YarnConfiguration configuration = new YarnConfiguration();
    new GenericOptionsParser(configuration, args);
    WebAppProxyServer proxyServer = startServer(configuration);
    proxyServer.proxy.join();
  } catch (Throwable t) {
    ExitUtil.terminate(-1, t);
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:13,代码来源:WebAppProxyServer.java

示例15: main

import org.apache.hadoop.yarn.YarnUncaughtExceptionHandler; //导入依赖的package包/类
public static void main(String[] args) throws IOException {
  Thread.setDefaultUncaughtExceptionHandler(new YarnUncaughtExceptionHandler());
  StringUtils.startupShutdownMessage(NodeManager.class, args, LOG);
  NodeManager nodeManager = new NodeManager();
  Configuration conf = new YarnConfiguration();
  new GenericOptionsParser(conf, args);
  nodeManager.initAndStartNodeManager(conf, false);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:9,代码来源:NodeManager.java


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