public static CLIServiceClientWrapper newRetryingCLIServiceClient(HiveConf conf) throws HiveSQLException {
      handlerInst = new RetryingThriftCLIServiceClientTest(conf);
      TTransport tTransport
        = handlerInst.connectWithRetry(conf.getIntVar(HiveConf.ConfVars.HIVE_SERVER2_THRIFT_CLIENT_RETRY_LIMIT));
      ICLIService cliService =
        (ICLIService) Proxy.newProxyInstance(RetryingThriftCLIServiceClientTest.class.getClassLoader(),
          CLIServiceClient.class.getInterfaces(), handlerInst);
      return new CLIServiceClientWrapper(cliService, tTransport, conf);
    }
Test CLI service with a retrying client. All tests should pass. This is to validate that calls
are transferred successfully.
service/src/test/org/apache/hive/service/cli/TestRetryingThriftCLIServiceClient.java