gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-15 04:51:31 27 4
gpt4 key购买 nike

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

YarnClient.submitApplication介绍

[英]Submits the application known to YarnClient instance.
[中]提交YanClient实例已知的应用程序。

代码示例

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

@Override
public void run(String... args) throws Exception {
  if (!StringUtils.hasText(action)) {
    // no action, silently bail out
    return;
  } else if (yarnClient == null) {
    log.warn("We have action=" + action + " but no yarnClient");
    return;
  }
  log.info("Running action=" + action);
  if (ACTION_SUBMIT.equals(action)) {
    log.info("Submitting application");
    yarnClient.submitApplication();
  } else {
    log.warn("Unable to do startup with unknown action=" + action);
  }
}

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

/**
 * Submit an application.
 *
 * @return the submitted application {@link ApplicationId}
 */
protected ApplicationId submitApplication() {
  Assert.notNull(getYarnClient(), "Yarn client must be set");
  ApplicationId applicationId = getYarnClient().submitApplication();
  Assert.notNull(applicationId, "Failed to get application id from submit");
  return applicationId;
}

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

@Override
public ApplicationId runWithSpringApplication(ApplicationContext context) throws Exception {
  YarnClient client = context.getBean(YarnClient.class);
  SpringYarnProperties syp = context.getBean(SpringYarnProperties.class);
  String applicationdir = SpringYarnBootUtils.resolveApplicationdir(syp);
  if (client instanceof ApplicationYarnClient) {
    return ((ApplicationYarnClient)client).submitApplication(new ApplicationDescriptor(applicationdir, applicationName));
  } else {
    return client.submitApplication(false);
  }
}

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

@Override
protected ExitStatus handleBeanRun(YarnClient bean, String[] parameters, Set<String> opts) {
  Properties properties = StringUtils.splitArrayElementsIntoProperties(parameters, "=");
  if (opts.contains(OPT_SUBMIT)) {
    bean.submitApplication();
  } else if (opts.contains(OPT_LIST)) {
    printApplicationsReport(bean.listApplications());
  } else if (opts.contains(OPT_KILL)) {
    ApplicationId appId = queryApplicationId(bean,
        properties != null ? properties.getProperty(ARG_APPLICATION_ID) : null);
    if (appId != null) {
      bean.killApplication(appId);
    }
  }
  return ExitStatus.COMPLETED;
}

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