Search in sources :

Example 1 with ICLIService

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);
}
Also used : TTransport(org.apache.thrift.transport.TTransport) ICLIService(org.apache.hive.service.cli.ICLIService)

Aggregations

ICLIService (org.apache.hive.service.cli.ICLIService)1 TTransport (org.apache.thrift.transport.TTransport)1