YARN-3369. Missing NullPointer check in AppSchedulingInfo causes RM to die. (Brahma Reddy Battula via wangda)
(cherry picked from commit6bc7710ec7
) (cherry picked from commit8e142d27cb
) (cherry picked from commit 4d43be3c01b1bc0deb31a9081fca5395d0eb4e0d)
This commit is contained in:
parent
553efd7190
commit
005d865494
|
@ -114,6 +114,9 @@ Release 2.6.1 - UNRELEASED
|
|||
YARN-3267. Timelineserver applies the ACL rules after applying the limit on
|
||||
the number of records (Chang Li via jeagles)
|
||||
|
||||
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
|
||||
|
|
|
@ -236,7 +236,7 @@ public class AppSchedulingInfo {
|
|||
|
||||
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) {
|
||||
|
@ -380,9 +380,11 @@ public class AppSchedulingInfo {
|
|||
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