YARN-4729. SchedulerApplicationAttempt#getTotalRequiredResources can throw an NPE. (kasha)
(cherry picked from commit c684f2b007
)
This commit is contained in:
parent
4892f6a0eb
commit
6a75c5af09
|
@ -166,6 +166,9 @@ Release 2.9.0 - UNRELEASED
|
|||
YARN-4651. Document movetoqueue option in 'YARN Commands'
|
||||
(Takashi Ohnishi via rohithsharmaks)
|
||||
|
||||
YARN-4729. SchedulerApplicationAttempt#getTotalRequiredResources can throw
|
||||
an NPE. (kasha)
|
||||
|
||||
Release 2.8.0 - UNRELEASED
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
|
|
@ -244,7 +244,8 @@ public class SchedulerApplicationAttempt implements SchedulableEntity {
|
|||
}
|
||||
|
||||
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) {
|
||||
|
|
Loading…
Reference in New Issue