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,
|
void addContainersForPreemption(Collection<RMContainer> containers,
|
||||||
FSAppAttempt app) {
|
FSAppAttempt app) {
|
||||||
|
|
||||||
appIdToAppMap.putIfAbsent(app.getApplicationAttemptId(), app);
|
ApplicationAttemptId attempt = app.getApplicationAttemptId();
|
||||||
resourcesPreemptedForApp.putIfAbsent(app, Resource.newInstance(0, 0));
|
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);
|
Resource appReserved = resourcesPreemptedForApp.get(app);
|
||||||
|
|
||||||
for(RMContainer container : containers) {
|
for(RMContainer container : containers) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user