YARN-3369. Missing NullPointer check in AppSchedulingInfo causes RM to die. (Brahma Reddy Battula via wangda)
This commit is contained in:
parent
1a4b528691
commit
6bc7710ec7
@ -802,6 +802,9 @@ Release 2.7.0 - UNRELEASED
|
||||
YARN-3379. Fixed missing data in localityTable and ResourceRequests table
|
||||
in RM WebUI. (Xuan Gong via jianhe)
|
||||
|
||||
YARN-3369. Missing NullPointer check in AppSchedulingInfo causes RM to die.
|
||||
(Brahma Reddy Battula via wangda)
|
||||
|
||||
Release 2.6.0 - 2014-11-18
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
@ -239,7 +239,7 @@ synchronized public ResourceRequest getResourceRequest(Priority priority,
|
||||
|
||||
public synchronized Resource getResource(Priority priority) {
|
||||
ResourceRequest request = getResourceRequest(priority, ResourceRequest.ANY);
|
||||
return request.getCapability();
|
||||
return (request == null) ? null : request.getCapability();
|
||||
}
|
||||
|
||||
public synchronized boolean isBlacklisted(String resourceName) {
|
||||
@ -382,9 +382,11 @@ synchronized private void checkForDeactivation() {
|
||||
boolean deactivate = true;
|
||||
for (Priority priority : getPriorities()) {
|
||||
ResourceRequest request = getResourceRequest(priority, ResourceRequest.ANY);
|
||||
if (request.getNumContainers() > 0) {
|
||||
deactivate = false;
|
||||
break;
|
||||
if (request != null) {
|
||||
if (request.getNumContainers() > 0) {
|
||||
deactivate = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (deactivate) {
|
||||
|
Loading…
Reference in New Issue
Block a user