protected State getHostComponentState(ServiceComponentHostResponse hostComponent) {
    return State.valueOf(hostComponent.getLiveState());
  }
Default calculator of service state.
The following rules should apply :
For services that have all components DISABLED, the service state should be DISABLED.
For services that have any master components, the service state should
be STARTED if all master components are STARTED.
For services that have all client components, the service state should
be INSTALLED if all of the components are INSTALLED.
For all other cases the state of the service should match the highest state of all
of its component states or UNKNOWN if the component states can not be determined.
ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/state/DefaultServiceCalculatedState.java