gpt4 book ai didi

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

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

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

YarnClusterConfiguration.<init>介绍

暂无

代码示例

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

public YarnClusterConfiguration toYarnClusterConfiguration() {
  Preconditions.checkNotNull(yarnSite, "yarn.site.location is not configured");
  Preconditions.checkNotNull(homeDir, "athenax.home.dir is not configured");
  Preconditions.checkNotNull(flinkUberJar, "flink.uber.jar.location is not configured");
  YarnConfiguration yarnConf = new YarnConfiguration();
  yarnConf.addResource(new Path(URI.create(yarnSite)));
  return new YarnClusterConfiguration(
    yarnConf, homeDir, new Path(flinkUberJar),
    resourcesToLocalize.stream().map(x -> new Path(URI.create(x))).collect(Collectors.toSet()),
    additionalJars.stream().map(x -> new Path(URI.create(x))).collect(Collectors.toSet()));
 }
}

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

private YarnClusterConfiguration prepareYarnCluster() throws IOException, URISyntaxException {
 yarnCluster.init(yarnConf);
 yarnCluster.start();
 yarnConf.set(RM_ADDRESS, yarnCluster.getResourceManager().getConfig().get(RM_ADDRESS));
 File yarnSite = new File(workDir, "yarn-site.xml");
 try (PrintWriter pw = new PrintWriter(new FileWriter(yarnSite))) {
  yarnConf.writeXml(pw);
 }
 Path flinkUberJar = new Path(new File(workDir, "flink.jar").toURI());
 Path flinkConfYaml = new Path(new File(workDir, "flink-conf.yaml").toURI());
 @SuppressWarnings("ConstantConditions")
 Path log4jPath = new Path(Thread.currentThread().getContextClassLoader().getResource("log4j.properties").toURI());
 Set<Path> resourcesToLocalize = new HashSet<>(Arrays.asList(flinkUberJar, flinkConfYaml, log4jPath));
 String home = workDir.toURI().toString();
 return new YarnClusterConfiguration(
   yarnConf,
   home,
   flinkUberJar,
   resourcesToLocalize,
   systemJars(yarnSite));
}

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