YARN-10703. Fix potential null pointer error of gpuNodeResourceUpdateHandler in NodeResourceMonitorImpl. Contributed by Qi Zhu.
(cherry picked from commit 181b9ddc513c405a84feb4715fa6ed4fe1a3d629)
This commit is contained in:
parent
8c82e3507d
commit
0e37da334b
@ -173,8 +173,10 @@ public class NodeResourceMonitorImpl extends AbstractService implements
|
||||
|
||||
float nodeGpuUtilization = 0F;
|
||||
try {
|
||||
nodeGpuUtilization =
|
||||
gpuNodeResourceUpdateHandler.getNodeGpuUtilization();
|
||||
if (gpuNodeResourceUpdateHandler != null) {
|
||||
nodeGpuUtilization =
|
||||
gpuNodeResourceUpdateHandler.getNodeGpuUtilization();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LOG.error("Get Node GPU Utilization error: " + e);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user