public class NumaNodeResource
extends java.lang.Object
| Constructor | Description |
|---|---|
NumaNodeResource(java.lang.String nodeId,
long totalMemory,
int totalCpus) |
| Modifier and Type | Method | 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(java.lang.Object obj) |
|
java.lang.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.
|
java.lang.String |
toString() |
public NumaNodeResource(java.lang.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 java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String getNodeId()
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.