YARN-4729. SchedulerApplicationAttempt#getTotalRequiredResources can throw an NPE. (kasha)
This commit is contained in:
parent
dbbfc58c33
commit
c684f2b007
|
@ -227,6 +227,9 @@ Release 2.9.0 - UNRELEASED
|
||||||
YARN-4651. Document movetoqueue option in 'YARN Commands'
|
YARN-4651. Document movetoqueue option in 'YARN Commands'
|
||||||
(Takashi Ohnishi via rohithsharmaks)
|
(Takashi Ohnishi via rohithsharmaks)
|
||||||
|
|
||||||
|
YARN-4729. SchedulerApplicationAttempt#getTotalRequiredResources can throw
|
||||||
|
an NPE. (kasha)
|
||||||
|
|
||||||
Release 2.8.0 - UNRELEASED
|
Release 2.8.0 - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -244,7 +244,8 @@ public class SchedulerApplicationAttempt implements SchedulableEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized int getTotalRequiredResources(Priority priority) {
|
public synchronized int getTotalRequiredResources(Priority priority) {
|
||||||
return getResourceRequest(priority, ResourceRequest.ANY).getNumContainers();
|
ResourceRequest request = getResourceRequest(priority, ResourceRequest.ANY);
|
||||||
|
return request == null ? 0 : request.getNumContainers();
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized Resource getResource(Priority priority) {
|
public synchronized Resource getResource(Priority priority) {
|
||||||
|
|
Loading…
Reference in New Issue