@VisibleForTesting
  synchronized Client getRangerClient(HiveConf hiveConf) {
    Client ret = null;
    ClientConfig config = new DefaultClientConfig();
    config.getClasses().add(MultiPartWriter.class);
    config.getProperties().put(ClientConfig.PROPERTY_FOLLOW_REDIRECTS, true);
    config.getProperties().put(ClientConfig.PROPERTY_CONNECT_TIMEOUT,
            (int) hiveConf.getTimeVar(HiveConf.ConfVars.REPL_EXTERNAL_CLIENT_CONNECT_TIMEOUT, TimeUnit.MILLISECONDS));
    config.getProperties().put(ClientConfig.PROPERTY_READ_TIMEOUT,
            (int) hiveConf.getTimeVar(HiveConf.ConfVars.REPL_RANGER_CLIENT_READ_TIMEOUT, TimeUnit.MILLISECONDS));
    ret = Client.create(config);
    return ret;
  }
RangerRestClientImpl to connect to Ranger and export policies.
ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ranger/RangerRestClientImpl.java