Package org.apache.hive.service.cli.thrift

Examples of org.apache.hive.service.cli.thrift.TOpenSessionResp$TOpenSessionRespTupleScheme


    // set the session configuration
    // openReq.setConfiguration(null);

    try {
      TOpenSessionResp openResp = client.OpenSession(openReq);

      // validate connection
      Utils.verifySuccess(openResp.getStatus());
      if (!supportedProtocols.contains(openResp.getServerProtocolVersion())) {
        throw new TException("Unsupported Hive2 protocol");
      }
      sessHandle = openResp.getSessionHandle();
    } catch (TException e) {
      throw new SQLException("Could not establish connection to "
          + jdbcURI + ": " + e.getMessage(), " 08S01", e);
    }
    isClosed = false;
View Full Code Here


      // 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) {
      String msg =  "Could not create http connection to " +
          jdbcUriString + ". " + e.getMessage();
View Full Code Here

      openReq.setUsername(sessConfMap.get(JdbcConnectionParams.AUTH_USER));
      openReq.setPassword(sessConfMap.get(JdbcConnectionParams.AUTH_PASSWD));
    }

    try {
      TOpenSessionResp openResp = client.OpenSession(openReq);

      // validate connection
      Utils.verifySuccess(openResp.getStatus());
      if (!supportedProtocols.contains(openResp.getServerProtocolVersion())) {
        throw new TException("Unsupported Hive2 protocol");
      }
      protocol = openResp.getServerProtocolVersion();
      sessHandle = openResp.getSessionHandle();
    } catch (TException e) {
      LOG.error("Error opening session", e);
      throw new SQLException("Could not establish connection to "
          + jdbcUriString + ": " + e.getMessage(), " 08S01", e);
    }
View Full Code Here

          sessVars.get(HiveAuthFactory.HS2_PROXY_USER));
      openReq.setConfiguration(openConf);
    }

    try {
      TOpenSessionResp openResp = client.OpenSession(openReq);

      // validate connection
      Utils.verifySuccess(openResp.getStatus());
      if (!supportedProtocols.contains(openResp.getServerProtocolVersion())) {
        throw new TException("Unsupported Hive2 protocol");
      }
      protocol = openResp.getServerProtocolVersion();
      sessHandle = openResp.getSessionHandle();
    } catch (TException e) {
      LOG.error("Error opening session", e);
      throw new SQLException("Could not establish connection to "
          + jdbcURI + ": " + e.getMessage(), " 08S01", e);
    }
View Full Code Here

      // set the session configuration
      // openReq.setConfiguration(null);

      try {
        TOpenSessionResp openResp = client.OpenSession(openReq);

        // validate connection
        Utils.verifySuccess(openResp.getStatus());
        if (!supportedProtocols.contains(openResp.getServerProtocolVersion())) {
          throw new TException("Unsupported Hive2 protocol");
        }
        sessHandle = openResp.getSessionHandle();
      } catch (TException e) {
        throw new SQLException("Could not establish connection to "
            + uri + ": " + e.getMessage(), " 08S01");
      }
      isClosed = false;
View Full Code Here

TOP

Related Classes of org.apache.hive.service.cli.thrift.TOpenSessionResp$TOpenSessionRespTupleScheme

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.