protected void updateTimelineReaderAddress() throws AmbariException {
    Clusters clusters = injector.getInstance(AmbariManagementController.class).getClusters();
    if (clusters == null || clusters.getClusters() == null) {
      return;
    }
    for (Cluster cluster : clusters.getClusters().values()) {
      Set<String> installedServices = cluster.getServices().keySet();
      if (installedServices.contains(YARN_SERVICE) && cluster.getService(YARN_SERVICE).getServiceComponents().keySet().contains("TIMELINE_READER")) {
        String timelineReaderHost = hostNameOf(cluster, YARN_SERVICE, "TIMELINE_READER").orElse("localhost");
        updateProperty(cluster, "yarn-site", "yarn.timeline-service.reader.webapp.address", timelineReaderHost + ":8198");
        updateProperty(cluster, "yarn-site", "yarn.timeline-service.reader.webapp.https.address", timelineReaderHost + ":8199");
      }
    }
  }
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