YARN-4510. Fix SLS startup failure caused by NPE. (Bibin A Chundatt via wangda)

(cherry picked from commit 6eefae1b33928486e7a8572e14eaf00b83f2acfc)
This commit is contained in:
Wangda Tan 2015-12-30 15:34:39 -08:00
parent 8310b2e9ff
commit a9594c61bb
3 changed files with 12 additions and 1 deletions

View File

@ -172,10 +172,11 @@ public void updateNodeHeartbeatResponseForContainersDecreasing(
// TODO Auto-generated method stub
}
@SuppressWarnings("unchecked")
@Override
public List<Container> pullNewlyIncreasedContainers() {
// TODO Auto-generated method stub
return null;
return Collections.EMPTY_LIST;
}
@Override

View File

@ -819,6 +819,14 @@ public void serviceInit(Configuration conf) throws Exception {
((AbstractYarnScheduler<SchedulerApplicationAttempt, SchedulerNode>)
scheduler).init(conf);
super.serviceInit(conf);
initScheduler(conf);
}
private synchronized void initScheduler(Configuration configuration) throws
IOException {
this.applications =
new ConcurrentHashMap<ApplicationId,
SchedulerApplication<SchedulerApplicationAttempt>>();
}
@SuppressWarnings("unchecked")

View File

@ -1260,6 +1260,8 @@ Release 2.7.3 - UNRELEASED
YARN-4315. NaN in Queue percentage for cluster apps page. (Bibin A Chundatt via wangda)
YARN-4510. Fix SLS startup failure caused by NPE. (Bibin A Chundatt via wangda)
Release 2.7.2 - UNRELEASED
INCOMPATIBLE CHANGES