public static String addProtocolIfMissing(String url, String protocol) throws AmbariApiException {
    if (!hasProtocol(url)) {
      url = protocol + "://" + url;
    }
    return url;
  }
@return Returns the protocol used by YARN daemons, the value is always taken from the
yarn-site.xml.
contrib/views/utils/src/main/java/org/apache/ambari/view/utils/ambari/Services.java