YARN-9584. Should put initializeProcessTrees method call before get pid. Contributed by Wanqiang Ji.
(cherry picked from commit 67414a1a80
)
This commit is contained in:
parent
e97acb3bd8
commit
f6c4e006cd
|
@ -489,11 +489,10 @@ public class ContainersMonitorImpl extends AbstractService implements
|
||||||
ContainerId containerId = entry.getKey();
|
ContainerId containerId = entry.getKey();
|
||||||
ProcessTreeInfo ptInfo = entry.getValue();
|
ProcessTreeInfo ptInfo = entry.getValue();
|
||||||
try {
|
try {
|
||||||
String pId = ptInfo.getPID();
|
|
||||||
|
|
||||||
// Initialize uninitialized process trees
|
// Initialize uninitialized process trees
|
||||||
initializeProcessTrees(entry);
|
initializeProcessTrees(entry);
|
||||||
|
|
||||||
|
String pId = ptInfo.getPID();
|
||||||
if (pId == null || !isResourceCalculatorAvailable()) {
|
if (pId == null || !isResourceCalculatorAvailable()) {
|
||||||
continue; // processTree cannot be tracked
|
continue; // processTree cannot be tracked
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue