• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ContainerHistoryData类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.hadoop.yarn.server.applicationhistoryservice.records.ContainerHistoryData的典型用法代码示例。如果您正苦于以下问题:Java ContainerHistoryData类的具体用法?Java ContainerHistoryData怎么用?Java ContainerHistoryData使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ContainerHistoryData类属于org.apache.hadoop.yarn.server.applicationhistoryservice.records包,在下文中一共展示了ContainerHistoryData类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: convertToContainerReport

import org.apache.hadoop.yarn.server.applicationhistoryservice.records.ContainerHistoryData; //导入依赖的package包/类
private ContainerReport convertToContainerReport(
    ContainerHistoryData containerHistory, String user) {
  // If the container has the aggregated log, add the server root url
  String logUrl = WebAppUtils.getAggregatedLogURL(
      serverHttpAddress,
      containerHistory.getAssignedNode().toString(),
      containerHistory.getContainerId().toString(),
      containerHistory.getContainerId().toString(),
      user);
  return ContainerReport.newInstance(containerHistory.getContainerId(),
    containerHistory.getAllocatedResource(),
    containerHistory.getAssignedNode(), containerHistory.getPriority(),
    containerHistory.getStartTime(), containerHistory.getFinishTime(),
    containerHistory.getDiagnosticsInfo(), logUrl,
    containerHistory.getContainerExitStatus(),
    containerHistory.getContainerState(), null);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:18,代码来源:ApplicationHistoryManagerImpl.java


示例2: getContainers

import org.apache.hadoop.yarn.server.applicationhistoryservice.records.ContainerHistoryData; //导入依赖的package包/类
@Override
public Map<ContainerId, ContainerReport> getContainers(
    ApplicationAttemptId appAttemptId) throws IOException {
  ApplicationReport app =
      getApplication(appAttemptId.getApplicationId());
  Map<ContainerId, ContainerHistoryData> histData =
      historyStore.getContainers(appAttemptId);
  HashMap<ContainerId, ContainerReport> containersReport =
      new HashMap<ContainerId, ContainerReport>();
  for (Entry<ContainerId, ContainerHistoryData> entry : histData.entrySet()) {
    containersReport.put(entry.getKey(),
      convertToContainerReport(entry.getValue(),
          app == null ? null : app.getUser()));
  }
  return containersReport;
}
 
开发者ID:naver,项目名称:hadoop,代码行数:17,代码来源:ApplicationHistoryManagerImpl.java


示例3: containerStarted

import org.apache.hadoop.yarn.server.applicationhistoryservice.records.ContainerHistoryData; //导入依赖的package包/类
@Override
public void containerStarted(ContainerStartData containerStart)
    throws IOException {
  ConcurrentMap<ContainerId, ContainerHistoryData> subMap =
      getSubMap(containerStart.getContainerId().getApplicationAttemptId());
  ContainerHistoryData oldData =
      subMap.putIfAbsent(containerStart.getContainerId(),
        ContainerHistoryData.newInstance(containerStart.getContainerId(),
          containerStart.getAllocatedResource(),
          containerStart.getAssignedNode(), containerStart.getPriority(),
          containerStart.getStartTime(), Long.MAX_VALUE, null,
          Integer.MAX_VALUE, null));
  if (oldData != null) {
    throw new IOException("The start information of container "
        + containerStart.getContainerId() + " is already stored.");
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:18,代码来源:MemoryApplicationHistoryStore.java


示例4: containerFinished

import org.apache.hadoop.yarn.server.applicationhistoryservice.records.ContainerHistoryData; //导入依赖的package包/类
@Override
public void containerFinished(ContainerFinishData containerFinish)
    throws IOException {
  ConcurrentMap<ContainerId, ContainerHistoryData> subMap =
      getSubMap(containerFinish.getContainerId().getApplicationAttemptId());
  ContainerHistoryData data = subMap.get(containerFinish.getContainerId());
  if (data == null) {
    throw new IOException("The finish information of container "
        + containerFinish.getContainerId() + " is stored before"
        + " the start information.");
  }
  // Make the assumption that ContainerState should not be null if
  // the finish information is already recorded
  if (data.getContainerState() != null) {
    throw new IOException("The finish information of container "
        + containerFinish.getContainerId() + " is already stored.");
  }
  data.setFinishTime(containerFinish.getFinishTime());
  data.setDiagnosticsInfo(containerFinish.getDiagnosticsInfo());
  data.setContainerExitStatus(containerFinish.getContainerExitStatus());
  data.setContainerState(containerFinish.getContainerState());
}
 
开发者ID:naver,项目名称:hadoop,代码行数:23,代码来源:MemoryApplicationHistoryStore.java


示例5: convertToContainerReport

import org.apache.hadoop.yarn.server.applicationhistoryservice.records.ContainerHistoryData; //导入依赖的package包/类
private ContainerReport convertToContainerReport(
    ContainerHistoryData containerHistory, String user) {
  // If the container has the aggregated log, add the server root url
  String logUrl = WebAppUtils.getAggregatedLogURL(
      serverHttpAddress,
      containerHistory.getAssignedNode().toString(),
      containerHistory.getContainerId().toString(),
      containerHistory.getContainerId().toString(),
      user);
  return ContainerReport.newInstance(containerHistory.getContainerId(),
    containerHistory.getAllocatedResource(),
    containerHistory.getAssignedNode(), containerHistory.getPriority(),
    containerHistory.getStartTime(), containerHistory.getFinishTime(),
    containerHistory.getDiagnosticsInfo(), logUrl,
    containerHistory.getContainerExitStatus(),
    containerHistory.getContainerState());
}
 
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:18,代码来源:ApplicationHistoryManagerImpl.java


示例6: getAMContainer

import org.apache.hadoop.yarn.server.applicationhistoryservice.records.ContainerHistoryData; //导入依赖的package包/类
@Override
public ContainerHistoryData getAMContainer(ApplicationAttemptId appAttemptId) {
  ApplicationAttemptHistoryData appAttempt =
      getApplicationAttempt(appAttemptId);
  if (appAttempt == null || appAttempt.getMasterContainerId() == null) {
    return null;
  } else {
    return getContainer(appAttempt.getMasterContainerId());
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:11,代码来源:MemoryApplicationHistoryStore.java


示例7: getContainer

import org.apache.hadoop.yarn.server.applicationhistoryservice.records.ContainerHistoryData; //导入依赖的package包/类
@Override
public ContainerHistoryData getContainer(ContainerId containerId) {
  Map<ContainerId, ContainerHistoryData> subMap =
      containerData.get(containerId.getApplicationAttemptId());
  if (subMap == null) {
    return null;
  } else {
    return subMap.get(containerId);
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:11,代码来源:MemoryApplicationHistoryStore.java


示例8: getContainers

import org.apache.hadoop.yarn.server.applicationhistoryservice.records.ContainerHistoryData; //导入依赖的package包/类
@Override
public Map<ContainerId, ContainerHistoryData> getContainers(
    ApplicationAttemptId appAttemptId) throws IOException {
  ConcurrentMap<ContainerId, ContainerHistoryData> subMap =
      containerData.get(appAttemptId);
  if (subMap == null) {
    return Collections.<ContainerId, ContainerHistoryData> emptyMap();
  } else {
    return new HashMap<ContainerId, ContainerHistoryData>(subMap);
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:12,代码来源:MemoryApplicationHistoryStore.java


示例9: getAMContainer

import org.apache.hadoop.yarn.server.applicationhistoryservice.records.ContainerHistoryData; //导入依赖的package包/类
@Override
public ContainerHistoryData getAMContainer(ApplicationAttemptId appAttemptId)
    throws IOException {
  ApplicationAttemptHistoryData attemptHistoryData =
      getApplicationAttempt(appAttemptId);
  if (attemptHistoryData == null
      || attemptHistoryData.getMasterContainerId() == null) {
    return null;
  }
  return getContainer(attemptHistoryData.getMasterContainerId());
}
 
开发者ID:naver,项目名称:hadoop,代码行数:12,代码来源:FileSystemApplicationHistoryStore.java


示例10: mergeContainerHistoryData

import org.apache.hadoop.yarn.server.applicationhistoryservice.records.ContainerHistoryData; //导入依赖的package包/类
private static void mergeContainerHistoryData(
    ContainerHistoryData historyData, ContainerStartData startData) {
  historyData.setAllocatedResource(startData.getAllocatedResource());
  historyData.setAssignedNode(startData.getAssignedNode());
  historyData.setPriority(startData.getPriority());
  historyData.setStartTime(startData.getStartTime());
}
 
开发者ID:naver,项目名称:hadoop,代码行数:8,代码来源:FileSystemApplicationHistoryStore.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java FactoryRegistryException类代码示例发布时间:2022-05-23
下一篇:
Java IcyInputStream类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap