gpt4 book ai didi

com.uber.athenax.backend.server.yarn.YarnClusterConfiguration.systemJars()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-20 18:32:31 28 4
gpt4 key购买 nike

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

YarnClusterConfiguration.systemJars介绍

[英]JARs that will be localized and put into the classpaths for bot JobManager and TaskManager.
[中]JAR将被本地化并放入bot JobManager和TaskManager的类路径中。

代码示例

代码示例来源:origin: uber/AthenaX

private void collectLocalResources(
  Map<String, LocalResource> resources,
  Set<Path> shippedPaths
) throws IOException {
 for (Path p : clusterConf.resourcesToLocalize()) {
  resources.put(p.getName(), toLocalResource(p, LocalResourceVisibility.APPLICATION));
 }
 for (Path p : Iterables.concat(clusterConf.systemJars(), job.userProvidedJars())) {
  String name = p.getName();
  if (resources.containsKey(name)) {
   throw new IllegalArgumentException("Duplicated name in the shipped files " + p);
  }
  resources.put(name, toLocalResource(p, LocalResourceVisibility.APPLICATION));
  shippedPaths.add(p);
 }
}

代码示例来源:origin: uber/AthenaX

public String generateYarnClusterConfContent(String clusterName) {
 StringBuffer sb = new StringBuffer();
 String parent = workDir.getAbsolutePath();
 sb.append("clusters:\n")
   .append(String.format("  %s:\n", clusterName))
   .append(String.format("    yarn.site.location: %s\n", new File(parent, "yarn-site.xml").toURI()))
   .append(String.format("    athenax.home.dir: %s\n", workDir.toURI()))
   .append(String.format("    flink.uber.jar.location: %s\n", new File(parent, "flink.jar").toURI()))
   .append("    localize.resources:\n");
 yarnClusterConf.resourcesToLocalize().forEach(x -> sb.append(String.format("      - %s\n", x.toUri())));
 sb.append("    additional.jars:\n");
 yarnClusterConf.systemJars().forEach(x -> sb.append(String.format("      - %s\n", x.toUri())));
 return sb.toString();
}

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