gpt4 book ai didi

org.apache.gobblin.yarn.YarnService.buildEventSubmitter()方法的使用及代码示例

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

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

YarnService.buildEventSubmitter介绍

暂无

代码示例

代码示例来源:origin: apache/incubator-gobblin

public YarnService(Config config, String applicationName, String applicationId, YarnConfiguration yarnConfiguration,
  FileSystem fs, EventBus eventBus) throws Exception {
 this.applicationName = applicationName;
 this.applicationId = applicationId;
 this.config = config;
 this.eventBus = eventBus;
 this.gobblinMetrics = config.getBoolean(ConfigurationKeys.METRICS_ENABLED_KEY) ?
   Optional.of(buildGobblinMetrics()) : Optional.<GobblinMetrics>absent();
 this.eventSubmitter = config.getBoolean(ConfigurationKeys.METRICS_ENABLED_KEY) ?
   Optional.of(buildEventSubmitter()) : Optional.<EventSubmitter>absent();
 this.yarnConfiguration = yarnConfiguration;
 this.fs = fs;
 this.amrmClientAsync = closer.register(
   AMRMClientAsync.createAMRMClientAsync(1000, new AMRMClientCallbackHandler()));
 this.amrmClientAsync.init(this.yarnConfiguration);
 this.nmClientAsync = closer.register(NMClientAsync.createNMClientAsync(new NMClientCallbackHandler()));
 this.nmClientAsync.init(this.yarnConfiguration);
 this.initialContainers = config.getInt(GobblinYarnConfigurationKeys.INITIAL_CONTAINERS_KEY);
 this.requestedContainerMemoryMbs = config.getInt(GobblinYarnConfigurationKeys.CONTAINER_MEMORY_MBS_KEY);
 this.requestedContainerCores = config.getInt(GobblinYarnConfigurationKeys.CONTAINER_CORES_KEY);
 this.containerHostAffinityEnabled = config.getBoolean(GobblinYarnConfigurationKeys.CONTAINER_HOST_AFFINITY_ENABLED);
 this.helixInstanceMaxRetries = config.getInt(GobblinYarnConfigurationKeys.HELIX_INSTANCE_MAX_RETRIES);
 this.containerJvmArgs = config.hasPath(GobblinYarnConfigurationKeys.CONTAINER_JVM_ARGS_KEY) ?
   Optional.of(config.getString(GobblinYarnConfigurationKeys.CONTAINER_JVM_ARGS_KEY)) :
   Optional.<String>absent();
 this.containerLaunchExecutor = Executors.newFixedThreadPool(10,
   ExecutorsUtils.newThreadFactory(Optional.of(LOGGER), Optional.of("ContainerLaunchExecutor")));
 this.tokens = getSecurityTokens();
}

代码示例来源:origin: org.apache.gobblin/gobblin-yarn

public YarnService(Config config, String applicationName, String applicationId, YarnConfiguration yarnConfiguration,
  FileSystem fs, EventBus eventBus) throws Exception {
 this.applicationName = applicationName;
 this.applicationId = applicationId;
 this.config = config;
 this.eventBus = eventBus;
 this.gobblinMetrics = config.getBoolean(ConfigurationKeys.METRICS_ENABLED_KEY) ?
   Optional.of(buildGobblinMetrics()) : Optional.<GobblinMetrics>absent();
 this.eventSubmitter = config.getBoolean(ConfigurationKeys.METRICS_ENABLED_KEY) ?
   Optional.of(buildEventSubmitter()) : Optional.<EventSubmitter>absent();
 this.yarnConfiguration = yarnConfiguration;
 this.fs = fs;
 this.amrmClientAsync = closer.register(
   AMRMClientAsync.createAMRMClientAsync(1000, new AMRMClientCallbackHandler()));
 this.amrmClientAsync.init(this.yarnConfiguration);
 this.nmClientAsync = closer.register(NMClientAsync.createNMClientAsync(new NMClientCallbackHandler()));
 this.nmClientAsync.init(this.yarnConfiguration);
 this.initialContainers = config.getInt(GobblinYarnConfigurationKeys.INITIAL_CONTAINERS_KEY);
 this.requestedContainerMemoryMbs = config.getInt(GobblinYarnConfigurationKeys.CONTAINER_MEMORY_MBS_KEY);
 this.requestedContainerCores = config.getInt(GobblinYarnConfigurationKeys.CONTAINER_CORES_KEY);
 this.containerHostAffinityEnabled = config.getBoolean(GobblinYarnConfigurationKeys.CONTAINER_HOST_AFFINITY_ENABLED);
 this.helixInstanceMaxRetries = config.getInt(GobblinYarnConfigurationKeys.HELIX_INSTANCE_MAX_RETRIES);
 this.containerJvmArgs = config.hasPath(GobblinYarnConfigurationKeys.CONTAINER_JVM_ARGS_KEY) ?
   Optional.of(config.getString(GobblinYarnConfigurationKeys.CONTAINER_JVM_ARGS_KEY)) :
   Optional.<String>absent();
 this.containerLaunchExecutor = Executors.newFixedThreadPool(10,
   ExecutorsUtils.newThreadFactory(Optional.of(LOGGER), Optional.of("ContainerLaunchExecutor")));
 this.tokens = getSecurityTokens();
}

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