private String getActiveRMUrl(String[] urls) {
    if (urls.length == 1)
      return urls[0].trim();
    else {
      for (String url : urls) {
        url = url.trim();
        if (isActiveUrl(url))
          return url;
      }
    }
    LOG.error("All ResourceManagers are not accessible or none seem to be active.");
    throw new AmbariApiException("RA110 All ResourceManagers are not accessible or none seem to be active.");
  }
Returns active RM URL. All RM Urls for RM HA is passed as an argument. This iterates over the list of RM hosts
and gets the cluster info. Breaks out and returns the URL when the 'haStatus' parameter returns "ACTIVE".
If only one url is passed, it is considered as ACTIVE and returned. No API call is made in that case.
@param urls array of all the RM Urls
@return url of the active RM
contrib/views/utils/src/main/java/org/apache/ambari/view/utils/ambari/Services.java