本文整理了Java中org.springframework.yarn.am.YarnAppmaster.submitApplication()
方法的一些代码示例,展示了YarnAppmaster.submitApplication()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YarnAppmaster.submitApplication()
方法的具体详情如下:
包路径:org.springframework.yarn.am.YarnAppmaster
类名称: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();
内容来源于网络,如有侵权,请联系作者删除!