public class NumaNodeResource extends Object
| Constructor and Description | 
|---|
| NumaNodeResource(String nodeId,
                long totalMemory,
                int totalCpus) | 
| Modifier and Type | Method and Description | 
|---|---|
| int | assignAvailableCpus(int cpusreq,
                   org.apache.hadoop.yarn.api.records.ContainerId containerId)Assigns available cpu's and returns the remaining needed cpu's. | 
| long | assignAvailableMemory(long memreq,
                     org.apache.hadoop.yarn.api.records.ContainerId containerId)Assigns available memory and returns the remaining needed memory. | 
| void | assignResources(org.apache.hadoop.yarn.api.records.Resource resource,
               org.apache.hadoop.yarn.api.records.ContainerId containerId)Assigns the requested resources for Container. | 
| boolean | equals(Object obj) | 
| String | getNodeId() | 
| int | hashCode() | 
| boolean | isResourcesAvailable(org.apache.hadoop.yarn.api.records.Resource resource)Checks whether the specified resources available or not. | 
| void | recoverCpus(org.apache.hadoop.yarn.api.records.ContainerId containerId,
           int cpus)Recovers the cpu's resources for Container. | 
| void | recoverMemory(org.apache.hadoop.yarn.api.records.ContainerId containerId,
             long memory)Recovers the memory resources for Container. | 
| void | releaseResources(org.apache.hadoop.yarn.api.records.ContainerId containerId)Releases the assigned resources for Container. | 
| String | toString() | 
public NumaNodeResource(String nodeId, long totalMemory, int totalCpus)
public boolean isResourcesAvailable(org.apache.hadoop.yarn.api.records.Resource resource)
resource - resourcepublic long assignAvailableMemory(long memreq,
                                  org.apache.hadoop.yarn.api.records.ContainerId containerId)
memreq - required memorycontainerId - which container memory to assignpublic int assignAvailableCpus(int cpusreq,
                               org.apache.hadoop.yarn.api.records.ContainerId containerId)
cpusreq - required cpu'scontainerId - which container cpu's to assignpublic void assignResources(org.apache.hadoop.yarn.api.records.Resource resource,
                            org.apache.hadoop.yarn.api.records.ContainerId containerId)
resource - resource to assigncontainerId - to which container the resources to assignpublic void releaseResources(org.apache.hadoop.yarn.api.records.ContainerId containerId)
containerId - to which container the assigned resources to releasepublic void recoverMemory(org.apache.hadoop.yarn.api.records.ContainerId containerId,
                          long memory)
containerId - recover the memory resources for the Containermemory - memory to recoverpublic void recoverCpus(org.apache.hadoop.yarn.api.records.ContainerId containerId,
                        int cpus)
containerId - recover the cpu's resources for the Containercpus - cpu's to recoverpublic String getNodeId()
Copyright © 2008–2023 Apache Software Foundation. All rights reserved.