private String getProtocol(String yarnHttpPolicyConfig) {
    return HTTPS_ONLY.equals(yarnHttpPolicyConfig) ? "https" : "http";
  }
Checks if URL has the protocol
@param url url
@return true if protocol is present
contrib/views/utils/src/main/java/org/apache/ambari/view/utils/ambari/Services.java