org.apache.hadoop.yarn.api.records.Container.setAllocationTags()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(100)

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

Container.setAllocationTags介绍

暂无

代码示例

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager

private RMContainer recoverAndCreateContainer(NMContainerStatus status,
  RMNode node, String queueName) {
 Container container =
   Container.newInstance(status.getContainerId(), node.getNodeID(),
    node.getHttpAddress(), status.getAllocatedResource(),
    status.getPriority(), null);
 container.setVersion(status.getVersion());
 container.setExecutionType(status.getExecutionType());
 container.setAllocationRequestId(status.getAllocationRequestId());
 container.setAllocationTags(status.getAllocationTags());
 ApplicationAttemptId attemptId =
   container.getId().getApplicationAttemptId();
 RMContainer rmContainer = new RMContainerImpl(container,
   SchedulerRequestKey.extractFrom(container), attemptId, node.getNodeID(),
   applications.get(attemptId.getApplicationId()).getUser(), rmContext,
   status.getCreationTime(), status.getNodeLabelExpression());
 ((RMContainerImpl) rmContainer).setQueueName(queueName);
 return rmContainer;
}

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager

container.setAllocationTags(ImmutableSet.of("mapper"));
ConcurrentMap<ApplicationId, RMApp> rmApps =
  spy(new ConcurrentHashMap<ApplicationId, RMApp>());

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager

container.getAllocationRequestId(),
     rmContainer.getAllocationTags()));
 container.setAllocationTags(rmContainer.getAllocationTags());
 updateNMToken(container);
} catch (IllegalArgumentException e) {

相关文章