YARN-4205. Addendum patch to fix branch-2.

This commit is contained in:
Li Lu 2016-09-29 15:41:31 -07:00
parent cf954d7a48
commit 919c0802fa
1 changed files with 4 additions and 1 deletions

View File

@ -100,7 +100,10 @@ public class RMAppLifetimeMonitor
ApplicationTimeoutType timeoutType, long monitorStartTime, long timeout) {
RMAppToMonitor appToMonitor = new RMAppToMonitor(appId, timeoutType);
register(appToMonitor, monitorStartTime);
monitoredApps.putIfAbsent(appToMonitor, timeout);
Long oldTimeout = monitoredApps.get(appToMonitor);
if (oldTimeout == null) {
monitoredApps.put(appToMonitor, timeout);
}
}
@Override