@VisibleForTesting
  boolean checkConnectionPlain(String url, HiveConf hiveConf) {
    WebResource.Builder builder;
    builder = getRangerResourceBuilder(url, hiveConf);
    ClientResponse clientResp = builder.get(ClientResponse.class);
    return (clientResp.getStatus() < HttpServletResponse.SC_UNAUTHORIZED);
  }
RangerRestClientImpl to connect to Ranger and export policies.
ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ranger/RangerRestClientImpl.java