private void buildServiceProperties() {
    if (isValid()) {
      Map<String, String> properties = Maps.newHashMap();
      for (ServicePropertyInfo property : getServicePropertyList()) {
        properties.put(property.getName(), property.getValue());
      }
      servicePropertyMap = ImmutableMap.copyOf(ensureMandatoryServiceProperties(properties));
    } else {
      servicePropertyMap = ImmutableMap.of();
    }


  }
Constructs the map that stores the service properties defined in the xml service definition.
The keys are the property names and values the property values.
It ensures that missing required service properties are added with default values.
ambari-server/src/main/java/org/apache/ambari/server/state/ServiceInfo.java