gpt4 book ai didi

org.springframework.yarn.am.YarnAppmaster.submitApplication()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-19 21:37:31 26 4
gpt4 key购买 nike

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

YarnAppmaster.submitApplication介绍

[英]Submit and run application.
[中]提交并运行应用程序。

代码示例

代码示例来源:origin: org.springframework.data/spring-yarn-core

@Override
protected ExitStatus handleBeanRun(YarnAppmaster bean, String[] parameters, Set<String> opts) {
  Properties properties = StringUtils.splitArrayElementsIntoProperties(parameters, "=");
  bean.setParameters(properties != null ? properties : new Properties());
  bean.setEnvironment(System.getenv());
  if(log.isDebugEnabled()) {
    log.debug("Starting YarnAppmaster bean: " + StringUtils.arrayToCommaDelimitedString(parameters));
  }
  bean.addAppmasterStateListener(new AppmasterStateListener() {
    @Override
    public void state(AppmasterState state) {
      if(state == AppmasterState.COMPLETED) {
        latch.countDown();
      }
    }
  });
  bean.submitApplication();
  if(log.isDebugEnabled()) {
    log.debug("Waiting latch to receive appmaster complete state");
  }
  try {
    latch.await();
  } catch (InterruptedException e) {
    log.debug("Latch interrupted");
  }
  log.info("Bean run completed");
  return ExitStatus.COMPLETED;
}

代码示例来源:origin: org.springframework.data/spring-yarn-boot

appmaster.submitApplication();

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com