YARN-9584. Should put initializeProcessTrees method call before get pid. Contributed by Wanqiang Ji.

(cherry picked from commit 67414a1a80039e70e0afc1de171831a6e981f37a)
This commit is contained in:
Zhankun Tang 2019-06-18 12:23:52 +08:00
parent 8f4204dc3b
commit 829202740a

View File

@ -441,11 +441,10 @@ public void run() {
ContainerId containerId = entry.getKey();
ProcessTreeInfo ptInfo = entry.getValue();
try {
String pId = ptInfo.getPID();
// Initialize uninitialized process trees
initializeProcessTrees(entry);
String pId = ptInfo.getPID();
if (pId == null || !isResourceCalculatorAvailable()) {
continue; // processTree cannot be tracked
}