private Optional<String> hostNameOf(Cluster cluster, String serviceName, String componentName) throws AmbariException {
    try {
      ServiceComponent component = cluster.getService(serviceName).getServiceComponent(componentName);
      Set<String> hosts = component.getServiceComponentHosts().keySet();
      return hosts.isEmpty() ? Optional.empty() : Optional.of(hosts.iterator().next());
    } catch (ServiceComponentNotFoundException | ServiceNotFoundException e) {
      return Optional.empty();
    }
  }
Replace placeholder values in timeline reader address.
In Ambari 2.7 these properties are set to {{timeline_reader_address_http}} and {{timeline_reader_address_https}} and the stack code substitutes the proper host names.
In Ambari 2.7.1 the stack code no longer does this but the stack advisor and a SingleHostTopologyUpdater is responsible for replacing the hosts.
ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog271.java