YARN-10438. Handle null containerId in ClientRMService#getContainerReport() (#2313)
Co-authored-by: Shubham Gupta <gshubham@microsoft.com> (cherry picked from commit e3cd627069c7d35b4638af3f2299a248eeca3923) (cherry picked from commit ccb711544b13d4f52846dc5d4ab2491c010a2b9f)
This commit is contained in:
parent
cbf4a33549
commit
fa737f7684
@ -509,6 +509,9 @@ public GetApplicationAttemptsResponse getApplicationAttempts(
|
||||
public GetContainerReportResponse getContainerReport(
|
||||
GetContainerReportRequest request) throws YarnException, IOException {
|
||||
ContainerId containerId = request.getContainerId();
|
||||
if (containerId == null) {
|
||||
throw new ContainerNotFoundException("Invalid container id: null");
|
||||
}
|
||||
ApplicationAttemptId appAttemptId = containerId.getApplicationAttemptId();
|
||||
ApplicationId appId = appAttemptId.getApplicationId();
|
||||
UserGroupInformation callerUGI = getCallerUgi(appId,
|
||||
|
Loading…
x
Reference in New Issue
Block a user