org.apache.hadoop.yarn.server.nodemanager.NodeManager.init()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(4.0k)|赞(0)|评价(0)|浏览(147)

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

NodeManager.init介绍

暂无

代码示例

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

private void initAndStartNodeManager(Configuration conf, boolean hasToReboot) {
 try {
  // Remove the old hook if we are rebooting.
  if (hasToReboot && null != nodeManagerShutdownHook) {
   ShutdownHookManager.get().removeShutdownHook(nodeManagerShutdownHook);
  }
  nodeManagerShutdownHook = new CompositeServiceShutdownHook(this);
  ShutdownHookManager.get().addShutdownHook(nodeManagerShutdownHook,
                       SHUTDOWN_HOOK_PRIORITY);
  // System exit should be called only when NodeManager is instantiated from
  // main() funtion
  this.shouldExitOnShutdownEvent = true;
  this.init(conf);
  this.start();
 } catch (Throwable t) {
  LOG.fatal("Error starting NodeManager", t);
  System.exit(-1);
 }
}

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

private void initAndStartNodeManager(Configuration conf, boolean hasToReboot) {
 try {
  // Remove the old hook if we are rebooting.
  if (hasToReboot && null != nodeManagerShutdownHook) {
   ShutdownHookManager.get().removeShutdownHook(nodeManagerShutdownHook);
  }
  nodeManagerShutdownHook = new CompositeServiceShutdownHook(this);
  ShutdownHookManager.get().addShutdownHook(nodeManagerShutdownHook,
                       SHUTDOWN_HOOK_PRIORITY);
  // System exit should be called only when NodeManager is instantiated from
  // main() funtion
  this.shouldExitOnShutdownEvent = true;
  this.init(conf);
  this.start();
 } catch (Throwable t) {
  LOG.fatal("Error starting NodeManager", t);
  System.exit(-1);
 }
}

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

private void initAndStartNodeManager(Configuration conf, boolean hasToReboot) {
 try {
  // Failed to start if we're a Unix based system but we don't have bash.
  // Bash is necessary to launch containers under Unix-based systems.
  if (!Shell.WINDOWS) {
   if (!Shell.checkIsBashSupported()) {
    String message =
      "Failing NodeManager start since we're on a "
        + "Unix-based system but bash doesn't seem to be available.";
    LOG.error(message);
    throw new YarnRuntimeException(message);
   }
  }
  // Remove the old hook if we are rebooting.
  if (hasToReboot && null != nodeManagerShutdownHook) {
   ShutdownHookManager.get().removeShutdownHook(nodeManagerShutdownHook);
  }
  nodeManagerShutdownHook = new CompositeServiceShutdownHook(this);
  ShutdownHookManager.get().addShutdownHook(nodeManagerShutdownHook,
                       SHUTDOWN_HOOK_PRIORITY);
  // System exit should be called only when NodeManager is instantiated from
  // main() funtion
  this.shouldExitOnShutdownEvent = true;
  this.init(conf);
  this.start();
 } catch (Throwable t) {
  LOG.error("Error starting NodeManager", t);
  System.exit(-1);
 }
}

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

private void initAndStartNodeManager(Configuration conf, boolean hasToReboot) {
 try {
  // Failed to start if we're a Unix based system but we don't have bash.
  // Bash is necessary to launch containers under Unix-based systems.
  if (!Shell.WINDOWS) {
   if (!Shell.checkIsBashSupported()) {
    String message =
      "Failing NodeManager start since we're on a "
        + "Unix-based system but bash doesn't seem to be available.";
    LOG.fatal(message);
    throw new YarnRuntimeException(message);
   }
  }
  // Remove the old hook if we are rebooting.
  if (hasToReboot && null != nodeManagerShutdownHook) {
   ShutdownHookManager.get().removeShutdownHook(nodeManagerShutdownHook);
  }
  nodeManagerShutdownHook = new CompositeServiceShutdownHook(this);
  ShutdownHookManager.get().addShutdownHook(nodeManagerShutdownHook,
                       SHUTDOWN_HOOK_PRIORITY);
  // System exit should be called only when NodeManager is instantiated from
  // main() funtion
  this.shouldExitOnShutdownEvent = true;
  this.init(conf);
  this.start();
 } catch (Throwable t) {
  LOG.fatal("Error starting NodeManager", t);
  System.exit(-1);
 }
}

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

nodeManagers[index].init(config);
super.serviceInit(config);

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

nodeManagers[index].init(config);
super.serviceInit(config);

相关文章