code: private static FairSchedulerProtocol createClient(
        String target, Configuration conf) throws IOException {
      InetSocketAddress addr = NetUtils.createSocketAddr(target);
      UserGroupInformation ugi = UserGroupInformation.getCurrentUGI();
      LOG.info("Connecting to " + addr);
      return (FairSchedulerProtocol) RPC.getProxy(FairSchedulerProtocol.class,
          FairSchedulerProtocol.versionID, addr, ugi, conf,
          NetUtils.getSocketFactory(conf, FairSchedulerProtocol.class));
    }
docs: Create a FariScheduler RPC client
  @param target The host:port of the RPC server
  @param conf The configuration
  @return The FairScheduler client
  @throws IOException