Skip to content

Commit

Permalink
YARN-3369. Missing NullPointer check in AppSchedulingInfo causes RM t…
Browse files Browse the repository at this point in the history
…o die. (Brahma Reddy Battula via wangda)
  • Loading branch information
wangdatan committed Mar 20, 2015
1 parent 1a4b528 commit 6bc7710
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
3 changes: 3 additions & 0 deletions hadoop-yarn-project/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 6bc7710

Please sign in to comment.