@Override

    public String updateForClusterCreate(String propertyName,
                                         String origValue,
                                         Map<String, Map<String, String>> properties,
                                         ClusterTopology topology) {

      if (isDatabaseManaged(properties)) {
        return super.updateForClusterCreate(propertyName, origValue, properties, topology);
      } else {
        return origValue;
      }
    }
If database is a new managed database, update the property with the new host name which
runs the associated component.  If the database is external (non-managed), return the
original value.

@param propertyName  property name
@param origValue     original value of property
@param properties    all properties
@param topology      cluster topology

@return updated property value with old host name replaced by new host name or original value
        if the database is external
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java