当前位置: 首页>>代码示例>>Java>>正文


Java AHSClient.createAHSClient方法代码示例

本文整理汇总了Java中org.apache.hadoop.yarn.client.api.AHSClient.createAHSClient方法的典型用法代码示例。如果您正苦于以下问题:Java AHSClient.createAHSClient方法的具体用法?Java AHSClient.createAHSClient怎么用?Java AHSClient.createAHSClient使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.hadoop.yarn.client.api.AHSClient的用法示例。


在下文中一共展示了AHSClient.createAHSClient方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: serviceInit

import org.apache.hadoop.yarn.client.api.AHSClient; //导入方法依赖的package包/类
@SuppressWarnings("deprecation")
@Override
protected void serviceInit(Configuration conf) throws Exception {
  asyncApiPollIntervalMillis =
      conf.getLong(YarnConfiguration.YARN_CLIENT_APPLICATION_CLIENT_PROTOCOL_POLL_INTERVAL_MS,
        YarnConfiguration.DEFAULT_YARN_CLIENT_APPLICATION_CLIENT_PROTOCOL_POLL_INTERVAL_MS);
  asyncApiPollTimeoutMillis =
      conf.getLong(YarnConfiguration.YARN_CLIENT_APPLICATION_CLIENT_PROTOCOL_POLL_TIMEOUT_MS,
          YarnConfiguration.DEFAULT_YARN_CLIENT_APPLICATION_CLIENT_PROTOCOL_POLL_TIMEOUT_MS);
  submitPollIntervalMillis = asyncApiPollIntervalMillis;
  if (conf.get(YarnConfiguration.YARN_CLIENT_APP_SUBMISSION_POLL_INTERVAL_MS)
      != null) {
    submitPollIntervalMillis = conf.getLong(
      YarnConfiguration.YARN_CLIENT_APP_SUBMISSION_POLL_INTERVAL_MS,
      YarnConfiguration.DEFAULT_YARN_CLIENT_APPLICATION_CLIENT_PROTOCOL_POLL_INTERVAL_MS);
  }

  if (conf.getBoolean(YarnConfiguration.APPLICATION_HISTORY_ENABLED,
    YarnConfiguration.DEFAULT_APPLICATION_HISTORY_ENABLED)) {
    historyServiceEnabled = true;
    historyClient = AHSClient.createAHSClient();
    historyClient.init(conf);
  }

  if (conf.getBoolean(YarnConfiguration.TIMELINE_SERVICE_ENABLED,
      YarnConfiguration.DEFAULT_TIMELINE_SERVICE_ENABLED)) {
    timelineServiceEnabled = true;
    timelineClient = createTimelineClient();
    timelineClient.init(conf);
    timelineDTRenewer = getTimelineDelegationTokenRenewer(conf);
    timelineService = TimelineUtils.buildTimelineTokenService(conf);
  }

  timelineServiceBestEffort = conf.getBoolean(
      YarnConfiguration.TIMELINE_SERVICE_CLIENT_BEST_EFFORT,
      YarnConfiguration.DEFAULT_TIMELINE_SERVICE_CLIENT_BEST_EFFORT);
  super.serviceInit(conf);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:39,代码来源:YarnClientImpl.java

示例2: testClientStop

import org.apache.hadoop.yarn.client.api.AHSClient; //导入方法依赖的package包/类
@Test
public void testClientStop() {
  Configuration conf = new Configuration();
  AHSClient client = AHSClient.createAHSClient();
  client.init(conf);
  client.start();
  client.stop();
}
 
开发者ID:naver,项目名称:hadoop,代码行数:9,代码来源:TestAHSClient.java

示例3: serviceInit

import org.apache.hadoop.yarn.client.api.AHSClient; //导入方法依赖的package包/类
@SuppressWarnings("deprecation")
@Override
protected void serviceInit(Configuration conf) throws Exception {
  asyncApiPollIntervalMillis =
      conf.getLong(YarnConfiguration.YARN_CLIENT_APPLICATION_CLIENT_PROTOCOL_POLL_INTERVAL_MS,
        YarnConfiguration.DEFAULT_YARN_CLIENT_APPLICATION_CLIENT_PROTOCOL_POLL_INTERVAL_MS);
  asyncApiPollTimeoutMillis =
      conf.getLong(YarnConfiguration.YARN_CLIENT_APPLICATION_CLIENT_PROTOCOL_POLL_TIMEOUT_MS,
          YarnConfiguration.DEFAULT_YARN_CLIENT_APPLICATION_CLIENT_PROTOCOL_POLL_TIMEOUT_MS);
  submitPollIntervalMillis = asyncApiPollIntervalMillis;
  if (conf.get(YarnConfiguration.YARN_CLIENT_APP_SUBMISSION_POLL_INTERVAL_MS)
      != null) {
    submitPollIntervalMillis = conf.getLong(
      YarnConfiguration.YARN_CLIENT_APP_SUBMISSION_POLL_INTERVAL_MS,
      YarnConfiguration.DEFAULT_YARN_CLIENT_APPLICATION_CLIENT_PROTOCOL_POLL_INTERVAL_MS);
  }

  if (conf.getBoolean(YarnConfiguration.APPLICATION_HISTORY_ENABLED,
    YarnConfiguration.DEFAULT_APPLICATION_HISTORY_ENABLED)) {
    historyServiceEnabled = true;
    historyClient = AHSClient.createAHSClient();
    historyClient.init(conf);
  }

  if (conf.getBoolean(YarnConfiguration.TIMELINE_SERVICE_ENABLED,
      YarnConfiguration.DEFAULT_TIMELINE_SERVICE_ENABLED)) {
    timelineServiceEnabled = true;
    timelineClient = TimelineClient.createTimelineClient();
    timelineClient.init(conf);
    timelineDTRenewer = getTimelineDelegationTokenRenewer(conf);
    timelineService = TimelineUtils.buildTimelineTokenService(conf);
  }
  super.serviceInit(conf);
}
 
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:35,代码来源:YarnClientImpl.java

示例4: serviceInit

import org.apache.hadoop.yarn.client.api.AHSClient; //导入方法依赖的package包/类
@SuppressWarnings("deprecation")
@Override
protected void serviceInit(Configuration conf) throws Exception {
  asyncApiPollIntervalMillis =
      conf.getLong(YarnConfiguration.YARN_CLIENT_APPLICATION_CLIENT_PROTOCOL_POLL_INTERVAL_MS,
        YarnConfiguration.DEFAULT_YARN_CLIENT_APPLICATION_CLIENT_PROTOCOL_POLL_INTERVAL_MS);
  asyncApiPollTimeoutMillis =
      conf.getLong(YarnConfiguration.YARN_CLIENT_APPLICATION_CLIENT_PROTOCOL_POLL_TIMEOUT_MS,
          YarnConfiguration.DEFAULT_YARN_CLIENT_APPLICATION_CLIENT_PROTOCOL_POLL_TIMEOUT_MS);
  submitPollIntervalMillis = asyncApiPollIntervalMillis;
  if (conf.get(YarnConfiguration.YARN_CLIENT_APP_SUBMISSION_POLL_INTERVAL_MS)
      != null) {
    submitPollIntervalMillis = conf.getLong(
      YarnConfiguration.YARN_CLIENT_APP_SUBMISSION_POLL_INTERVAL_MS,
      YarnConfiguration.DEFAULT_YARN_CLIENT_APPLICATION_CLIENT_PROTOCOL_POLL_INTERVAL_MS);
  }

  if (conf.getBoolean(YarnConfiguration.APPLICATION_HISTORY_ENABLED,
    YarnConfiguration.DEFAULT_APPLICATION_HISTORY_ENABLED)) {
    historyServiceEnabled = true;
    historyClient = AHSClient.createAHSClient();
    historyClient.init(conf);
  }

  if (conf.getBoolean(YarnConfiguration.TIMELINE_SERVICE_ENABLED,
      YarnConfiguration.DEFAULT_TIMELINE_SERVICE_ENABLED)) {
    timelineServiceEnabled = true;
    timelineDTRenewer = getTimelineDelegationTokenRenewer(conf);
    timelineService = TimelineUtils.buildTimelineTokenService(conf);
  }

  timelineServiceBestEffort = conf.getBoolean(
      YarnConfiguration.TIMELINE_SERVICE_CLIENT_BEST_EFFORT,
      YarnConfiguration.DEFAULT_TIMELINE_SERVICE_CLIENT_BEST_EFFORT);
  super.serviceInit(conf);
}
 
开发者ID:hopshadoop,项目名称:hops,代码行数:37,代码来源:YarnClientImpl.java


注:本文中的org.apache.hadoop.yarn.client.api.AHSClient.createAHSClient方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。