private String calculateServiceState(String clusterName, String serviceName) {
    ServiceCalculatedState serviceCalculatedState = ServiceCalculatedStateFactory.getServiceStateProvider(serviceName);
    return serviceCalculatedState.getState(clusterName, serviceName).toString();
  }
Get a service request object from a map of property values.

@param properties  the predicate

@return the service request object
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java