private WebResource.Builder getRangerResourceBuilder(String url, HiveConf hiveConf) {
    Client client = getRangerClient(hiveConf);
    WebResource webResource = client.resource(url);
    WebResource.Builder builder = webResource.getRequestBuilder();
    return builder;
  }
RangerRestClientImpl to connect to Ranger and export policies.
ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ranger/RangerRestClientImpl.java