public TOpenSessionReq deepCopy() { return new TOpenSessionReq(this); }
/** * Performs a deep copy on <i>other</i>. */ public OpenSession_args(OpenSession_args other) { if (other.isSetReq()) { this.req = new TOpenSessionReq(other.req); } }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, OpenSession_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.req = new TOpenSessionReq(); struct.req.read(iprot); struct.setReqIsSet(true); } } }
public void read(org.apache.thrift.protocol.TProtocol iprot, OpenSession_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // REQ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.req = new TOpenSessionReq(); struct.req.read(iprot); struct.setReqIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); }
private void openSession() throws SQLException { TOpenSessionReq openReq = new TOpenSessionReq();
@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); } }
private void openSession() throws SQLException { TOpenSessionReq openReq = new TOpenSessionReq();
TOpenSessionReq openReq = new TOpenSessionReq(); TOpenSessionResp openResp = client.OpenSession(openReq); TSessionHandle sessHandle = openResp.getSessionHandle();
@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); } }