diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/main/java/org/apache/hadoop/yarn/service/client/ServiceClient.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/main/java/org/apache/hadoop/yarn/service/client/ServiceClient.java index 93a74e3cfa2..0ab332280f2 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/main/java/org/apache/hadoop/yarn/service/client/ServiceClient.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/main/java/org/apache/hadoop/yarn/service/client/ServiceClient.java @@ -1198,6 +1198,7 @@ public class ServiceClient extends AppAdminClient implements SliderExitCodes, 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);