private String[] getRMHAUrls(String httpPolicy) {
    String haRmIds = getYarnConfig(YARN_RESOURCEMANAGER_HA_RM_IDS_KEY);
    String[] ids = haRmIds.split(",");
    int index = 0;
    String[] urls = new String[ids.length];
    for (String id : ids) {
      String url = (HTTPS_ONLY.equals(httpPolicy)) ? getYarnConfig(YARN_RESOURCEMANAGER_HTTPS_HA_PARTIAL_KEY + id)
        : getYarnConfig(YARN_RESOURCEMANAGER_HTTP_HA_PARTIAL_KEY + id);

      if (url == null || url.isEmpty()) {
        url = getYarnConfig(YARN_RESOURCEMANAGER_HOSTNAME_PARTIAL_KEY + id).trim() + ":" + getDefaultRMPort(httpPolicy);
      }

      urls[index++] = addProtocolIfMissing(url.trim(), getProtocol(httpPolicy));
    }
    return urls;
  }
Returns URL to Resource Manager.
If cluster associated, returns HTTP or HTTPS address based on "yarn.http.policy" property value.
If not associated, retrieves RM URL from view instance properties by "yarn.resourcemanager.url" property.
@return url of RM
contrib/views/utils/src/main/java/org/apache/ambari/view/utils/ambari/Services.java