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

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

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

Container.getAllocationRequestId介绍

[英]Get the optional ID corresponding to the original ResourceRequest{@link #getAllocationRequestId()}}s which is satisfied by this allocated Container.

The scheduler may return multiple AllocateResponses corresponding to the same ID as and when scheduler allocates Containers. Applications can continue to completely ignore the returned ID in the response and use the allocation for any of their outstanding requests.
[中]获取与原始ResourceRequest{@link#getAllocationRequestId()}相对应的可选ID,该容器满足该请求。
当调度器分配容器时,调度器可能返回与相同ID对应的多个AllocateResponse。应用程序可以继续完全忽略响应中返回的ID,并将分配用于任何未完成的请求。

代码示例

代码示例来源:origin: linkedin/TonY

Map<String, String> containerShellEnv = new ConcurrentHashMap<>(containerEnv);
TonyTask task = session.getAndInitMatchingTask(container.getAllocationRequestId());

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

if (schedReq.getPriority().equals(container.getPriority())
  && schedReq.getAllocationRequestId() == container
    .getAllocationRequestId()) {
 int numAllocations =
   schedReq.getResourceSizing().getNumAllocations();

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-applications-distributedshell

allocatedContainer.getAllocationRequestId());
if (requests.iterator().hasNext()) {
 AMRMClient.ContainerRequest request = requests.iterator().next();

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

/**
 * Add the container to outstanding decreases.
 * @param updateReq UpdateContainerRequest.
 * @param schedulerNode SchedulerNode.
 * @param container Container.
 * @return If it was possible to decrease the container.
 */
public synchronized boolean checkAndAddToOutstandingDecreases(
  UpdateContainerRequest updateReq, SchedulerNode schedulerNode,
  Container container) {
 if (outstandingDecreases.containsKey(container.getId())) {
  return false;
 }
 if (ContainerUpdateType.DECREASE_RESOURCE ==
   updateReq.getContainerUpdateType()) {
  SchedulerRequestKey updateKey = new SchedulerRequestKey
    (container.getPriority(),
      container.getAllocationRequestId(), container.getId());
  cancelPreviousRequest(schedulerNode, updateKey);
  outstandingDecreases.put(container.getId(), updateReq.getCapability());
 } else {
  outstandingDecreases.put(container.getId(), container.getResource());
 }
 return true;
}

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

private void checkAllocatedContainer(Container allocated, int memory,
  NodeId nodeId, long allocationRequestId) {
 Assert.assertEquals(memory, allocated.getResource().getMemorySize());
 Assert.assertEquals(nodeId, allocated.getNodeId());
 Assert.assertEquals(allocationRequestId,
   allocated.getAllocationRequestId());
}

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

.filter(container -> container.getAllocationRequestId() == 1l)
  .collect(Collectors.toSet());
Assert.assertNotNull(containers);

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

allocatedContainers.get(0).getAllocationRequestId(),
ResourceRequest.ANY,
Resources.createResource(3 * GB), 0, true,

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

this.logAggregationContext, rmContainer.getNodeLabelExpression(),
    containerType, container.getExecutionType(),
    container.getAllocationRequestId(),
    rmContainer.getAllocationTags()));
container.setAllocationTags(rmContainer.getAllocationTags());

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

tempContainer.getExecutionType());
newContainer.setAllocationRequestId(
  existingRMContainer.getContainer().getAllocationRequestId());
newContainer.setVersion(existingRMContainer.getContainer().getVersion());

相关文章