@Override
  public String getUrl(Cluster cluster, String hostName)
      throws SystemException {
    Map<String, String> yarnConfig = cluster.getDesiredConfigByType(CONFIG_YARN_SITE).getProperties();
    Map<String, String> coreConfig = cluster.getDesiredConfigByType(CONFIG_CORE_SITE).getProperties();

    String yarnHttpPolicy = yarnConfig.get(PROPERTY_YARN_HTTP_POLICY);
    String hadoopSslEnabled = coreConfig.get(PROPERTY_HADOOP_SSL_ENABLED);

    boolean useHttps =
        (yarnHttpPolicy != null && yarnHttpPolicy.equals(PROPERTY_YARN_HTTP_POLICY_VALUE_HTTPS_ONLY)) ||
            (hadoopSslEnabled != null && hadoopSslEnabled.equals(PROPERTY_HADOOP_SSL_ENABLED_VALUE_TRUE));

    return String.format(URL_TEMPLATE, getProtocol(useHttps), hostName, getPort(hostName, yarnConfig, useHttps));
  }
Resource manager specific HTTP property request.
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ResourceManagerHttpPropertyRequest.java