use of org.apache.hive.service.cli.ICLIService in project hive by apache.
the class RetryingThriftCLIServiceClient method newRetryingCLIServiceClient.
public static CLIServiceClientWrapper newRetryingCLIServiceClient(HiveConf conf) throws HiveSQLException {
RetryingThriftCLIServiceClient retryClient = new RetryingThriftCLIServiceClient(conf);
TTransport tTransport = retryClient.connectWithRetry(conf.getIntVar(HiveConf.ConfVars.HIVE_SERVER2_THRIFT_CLIENT_CONNECTION_RETRY_LIMIT));
ICLIService cliService = (ICLIService) Proxy.newProxyInstance(RetryingThriftCLIServiceClient.class.getClassLoader(), CLIServiceClient.class.getInterfaces(), retryClient);
return new CLIServiceClientWrapper(cliService, tTransport, conf);
}
Aggregations