public String getWebHCatURL() {
    String host = null;

    if (context.getCluster() != null) {
      List<String> hiveServerHosts = context.getCluster().getHostsForServiceComponent("HIVE","WEBHCAT_SERVER");

      if (!hiveServerHosts.isEmpty()) {
        host = hiveServerHosts.get(0);
        LOG.info("WEBHCAT_SERVER component was found on host " + host);
      } else {
        LOG.warn("No host was found with WEBHCAT_SERVER component. Using hive.host property to get hostname.");
      }
    }

    if (host == null) {
      host = context.getProperties().get("webhcat.hostname");
      if (host == null || host.isEmpty()) {
        throw new AmbariApiException(
          "RA080 Can't determine WebHCat hostname neither by associated cluster nor by webhcat.hostname property.");
      }
    }

    String port = context.getProperties().get("webhcat.port");
    if (port == null || port.isEmpty()) {
      throw new AmbariApiException(
        "RA090 Can't determine WebHCat port neither by associated cluster nor by webhcat.port property.");
    }

    return String.format("http://%s:%s/templeton/v1", host, port);
  }
Returns URL to WebHCat in format like http://<hostname>:<port>/templeton/v1
@return url to WebHCat
contrib/views/utils/src/main/java/org/apache/ambari/view/utils/ambari/Services.java