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
|
YARN-3379. Fixed missing data in localityTable and ResourceRequests table
|
||||||
in RM WebUI. (Xuan Gong via jianhe)
|
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
|
Release 2.6.0 - 2014-11-18
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -239,7 +239,7 @@ public class AppSchedulingInfo {
|
||||||
|
|
||||||
public synchronized Resource getResource(Priority priority) {
|
public synchronized Resource getResource(Priority priority) {
|
||||||
ResourceRequest request = getResourceRequest(priority, ResourceRequest.ANY);
|
ResourceRequest request = getResourceRequest(priority, ResourceRequest.ANY);
|
||||||
return request.getCapability();
|
return (request == null) ? null : request.getCapability();
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized boolean isBlacklisted(String resourceName) {
|
public synchronized boolean isBlacklisted(String resourceName) {
|
||||||
|
@ -382,11 +382,13 @@ public class AppSchedulingInfo {
|
||||||
boolean deactivate = true;
|
boolean deactivate = true;
|
||||||
for (Priority priority : getPriorities()) {
|
for (Priority priority : getPriorities()) {
|
||||||
ResourceRequest request = getResourceRequest(priority, ResourceRequest.ANY);
|
ResourceRequest request = getResourceRequest(priority, ResourceRequest.ANY);
|
||||||
|
if (request != null) {
|
||||||
if (request.getNumContainers() > 0) {
|
if (request.getNumContainers() > 0) {
|
||||||
deactivate = false;
|
deactivate = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (deactivate) {
|
if (deactivate) {
|
||||||
activeUsersManager.deactivateApplication(user, applicationId);
|
activeUsersManager.deactivateApplication(user, applicationId);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue