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