YARN-6501. FSSchedulerNode.java fails to compile with JDK7. Contributed by John Zhuge
This commit is contained in:
parent
6865746ea4
commit
f5a9287bb1
@ -180,8 +180,13 @@ private synchronized void cleanupPreemptionList() {
|
||||
void addContainersForPreemption(Collection<RMContainer> containers,
|
||||
FSAppAttempt app) {
|
||||
|
||||
appIdToAppMap.putIfAbsent(app.getApplicationAttemptId(), app);
|
||||
resourcesPreemptedForApp.putIfAbsent(app, Resource.newInstance(0, 0));
|
||||
ApplicationAttemptId attempt = app.getApplicationAttemptId();
|
||||
if (appIdToAppMap.get(attempt) == null) {
|
||||
appIdToAppMap.put(attempt, app);
|
||||
}
|
||||
if (resourcesPreemptedForApp.get(app) == null) {
|
||||
resourcesPreemptedForApp.put(app, Resource.newInstance(0, 0));
|
||||
}
|
||||
Resource appReserved = resourcesPreemptedForApp.get(app);
|
||||
|
||||
for(RMContainer container : containers) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user