TOpenSessionResp openResp = client.OpenSession(openReq);
TOpenSessionResp openResp = client.OpenSession(openReq);
private TTransport createHttpTransport() throws SQLException, TTransportException { CloseableHttpClient httpClient; boolean useSsl = isSslConnection(); // Create an http client from the configs httpClient = getHttpClient(useSsl); try { transport = new THttpClient(getServerHttpUrl(useSsl), httpClient); // We'll call an open/close here to send a test HTTP message to the server. Any // TTransportException caused by trying to connect to a non-available peer are thrown here. // Bubbling them up the call hierarchy so that a retry can happen in openTransport, // if dynamic service discovery is configured. TCLIService.Iface client = new TCLIService.Client(new TBinaryProtocol(transport)); TOpenSessionResp openResp = client.OpenSession(new TOpenSessionReq()); if (openResp != null) { client.CloseSession(new TCloseSessionReq(openResp.getSessionHandle())); } } catch (TException e) { LOG.info("JDBC Connection Parameters used : useSSL = " + useSsl + " , httpPath = " + sessConfMap.get(JdbcConnectionParams.HTTP_PATH) + " Authentication type = " + sessConfMap.get(JdbcConnectionParams.AUTH_TYPE)); String msg = "Could not create http connection to " + jdbcUriString + ". " + e.getMessage(); throw new TTransportException(msg, e); } return transport; }
private TTransport createHttpTransport() throws SQLException, TTransportException { CloseableHttpClient httpClient; boolean useSsl = isSslConnection(); // Create an http client from the configs httpClient = getHttpClient(useSsl); try { transport = new THttpClient(getServerHttpUrl(useSsl), httpClient); // We'll call an open/close here to send a test HTTP message to the server. Any // TTransportException caused by trying to connect to a non-available peer are thrown here. // Bubbling them up the call hierarchy so that a retry can happen in openTransport, // if dynamic service discovery is configured. TCLIService.Iface client = new TCLIService.Client(new TBinaryProtocol(transport)); TOpenSessionResp openResp = client.OpenSession(new TOpenSessionReq()); if (openResp != null) { client.CloseSession(new TCloseSessionReq(openResp.getSessionHandle())); } } catch (TException e) { LOG.info("JDBC Connection Parameters used : useSSL = " + useSsl + " , httpPath = " + sessConfMap.get(JdbcConnectionParams.HTTP_PATH) + " Authentication type = " + sessConfMap.get(JdbcConnectionParams.AUTH_TYPE)); String msg = "Could not create http connection to " + jdbcUriString + ". " + e.getMessage(); throw new TTransportException(msg, e); } return transport; }
@Override public SessionHandle openSession(String username, String password, Map<String, String> configuration) throws HiveSQLException { try { TOpenSessionReq req = new TOpenSessionReq(); req.setUsername(username); req.setPassword(password); req.setConfiguration(configuration); TOpenSessionResp resp = cliService.OpenSession(req); checkStatus(resp.getStatus()); return new SessionHandle(resp.getSessionHandle(), resp.getServerProtocolVersion()); } catch (HiveSQLException e) { throw e; } catch (Exception e) { throw new HiveSQLException(e); } }
@Override public SessionHandle openSession(String username, String password, Map<String, String> configuration) throws HiveSQLException { try { TOpenSessionReq req = new TOpenSessionReq(); req.setUsername(username); req.setPassword(password); req.setConfiguration(configuration); TOpenSessionResp resp = cliService.OpenSession(req); checkStatus(resp.getStatus()); return new SessionHandle(resp.getSessionHandle(), resp.getServerProtocolVersion()); } catch (HiveSQLException e) { throw e; } catch (Exception e) { throw new HiveSQLException(e); } }
@Override public SessionHandle openSession(String username, String password, Map<String, String> configuration) throws HiveSQLException { try { TOpenSessionReq req = new TOpenSessionReq(); req.setUsername(username); req.setPassword(password); req.setConfiguration(configuration); TOpenSessionResp resp = cliService.OpenSession(req); checkStatus(resp.getStatus()); return new SessionHandle(resp.getSessionHandle(), resp.getServerProtocolVersion()); } catch (HiveSQLException e) { throw e; } catch (Exception e) { throw new HiveSQLException(e); } }
@Override public SessionHandle openSession(String username, String password, Map<String, String> configuration) throws HiveSQLException { try { TOpenSessionReq req = new TOpenSessionReq(); req.setUsername(username); req.setPassword(password); req.setConfiguration(configuration); TOpenSessionResp resp = cliService.OpenSession(req); checkStatus(resp.getStatus()); return new SessionHandle(resp.getSessionHandle(), resp.getServerProtocolVersion()); } catch (HiveSQLException e) { throw e; } catch (Exception e) { throw new HiveSQLException(e); } }
public OpenSession_result getResult(I iface, OpenSession_args args) throws org.apache.thrift.TException { OpenSession_result result = new OpenSession_result(); result.success = iface.OpenSession(args.req); return result; } }
public OpenSession_result getResult(I iface, OpenSession_args args) throws org.apache.thrift.TException { OpenSession_result result = new OpenSession_result(); result.success = iface.OpenSession(args.req); return result; } }
public OpenSession_result getResult(I iface, OpenSession_args args) throws org.apache.thrift.TException { OpenSession_result result = new OpenSession_result(); result.success = iface.OpenSession(args.req); return result; } }
public OpenSession_result getResult(I iface, OpenSession_args args) throws org.apache.thrift.TException { OpenSession_result result = new OpenSession_result(); result.success = iface.OpenSession(args.req); return result; } }