Class GpuNodeResourceUpdateHandler
java.lang.Object
org.apache.hadoop.yarn.server.nodemanager.containermanager.resourceplugin.NodeResourceUpdaterPlugin
org.apache.hadoop.yarn.server.nodemanager.containermanager.resourceplugin.gpu.GpuNodeResourceUpdateHandler
-
Constructor Summary
ConstructorsConstructorDescriptionGpuNodeResourceUpdateHandler(GpuDiscoverer gpuDiscoverer, org.apache.hadoop.conf.Configuration conf) -
Method Summary
Modifier and TypeMethodDescriptionfloatfloatvoidupdateConfiguredResource(org.apache.hadoop.yarn.api.records.Resource res) Update configured resource for the given component.
-
Constructor Details
-
GpuNodeResourceUpdateHandler
public GpuNodeResourceUpdateHandler(GpuDiscoverer gpuDiscoverer, org.apache.hadoop.conf.Configuration conf)
-
-
Method Details
-
updateConfiguredResource
public void updateConfiguredResource(org.apache.hadoop.yarn.api.records.Resource res) throws org.apache.hadoop.yarn.exceptions.YarnException Description copied from class:NodeResourceUpdaterPluginUpdate configured resource for the given component.- Specified by:
updateConfiguredResourcein classNodeResourceUpdaterPlugin- Parameters:
res- resource passed in by external module (such asNodeStatusUpdater- Throws:
org.apache.hadoop.yarn.exceptions.YarnException- when any issue happens.
-
getAvgNodeGpuUtilization
- Returns:
- The average physical GPUs used in this node. For example: Node with total 4 GPUs Physical used 2.4 GPUs Will return 2.4/4 = 0.6f
- Throws:
Exception- when any error happens
-
getTotalNodeGpuUtilization
- Returns:
- The total physical GPUs used in this node. For example: Node with total 4 GPUs Physical used 2.4 GPUs Will return 2.4f
- Throws:
Exception- when any error happens
-