def open_session(self, user, configuration=None): protocol = TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V6 req = TOpenSessionReq(client_protocol=protocol, username=user, configuration=configuration) resp = self._rpc('OpenSession', req) return HS2Session(self, resp.sessionHandle, resp.configuration, resp.serverProtocolVersion)
def open_session(service, user, configuration=None): req = TOpenSessionReq( client_protocol=TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V6, username=user, configuration=configuration) log.debug('open_session: req=%s', req) resp = service.OpenSession(req) log.debug('open_session: resp=%s', resp) err_if_rpc_not_ok(resp) return (resp.sessionHandle, resp.configuration, resp.serverProtocolVersion)