YARN-8357. Fixed NPE when YARN service is saved and not deployed.
Contributed by Chandni Singh
This commit is contained in:
parent
7ff5a40218
commit
d9852eb589
@ -1198,6 +1198,7 @@ public Service getStatus(String serviceName)
|
||||
ServiceApiUtil.validateNameFormat(serviceName, getConfig());
|
||||
Service appSpec = new Service();
|
||||
appSpec.setName(serviceName);
|
||||
appSpec.setState(ServiceState.STOPPED);
|
||||
ApplicationId currentAppId = getAppId(serviceName);
|
||||
if (currentAppId == null) {
|
||||
LOG.info("Service {} does not have an application ID", serviceName);
|
||||
|
Loading…
Reference in New Issue
Block a user