diff --git jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java index 70cc34d91e..eac9879260 100644 --- jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java +++ jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java @@ -31,6 +31,7 @@ import org.apache.hive.service.auth.SaslQOP; import org.apache.hive.service.cli.session.SessionUtils; import org.apache.hive.service.cli.thrift.EmbeddedThriftBinaryCLIService; +import org.apache.hive.service.rpc.thrift.TAuthenticateReq; import org.apache.hive.service.rpc.thrift.TCLIService; import org.apache.hive.service.rpc.thrift.TCancelDelegationTokenReq; import org.apache.hive.service.rpc.thrift.TCancelDelegationTokenResp; @@ -706,13 +707,14 @@ private void openSession() throws SQLException { openReq.setConfiguration(openConf); // Store the user name in the open request in case no non-sasl authentication + TAuthenticateReq tAuthenticateReq = new TAuthenticateReq(); if (JdbcConnectionParams.AUTH_SIMPLE.equals(sessConfMap.get(JdbcConnectionParams.AUTH_TYPE))) { - openReq.setUsername(sessConfMap.get(JdbcConnectionParams.AUTH_USER)); - openReq.setPassword(sessConfMap.get(JdbcConnectionParams.AUTH_PASSWD)); + tAuthenticateReq.setUsername(sessConfMap.get(JdbcConnectionParams.AUTH_USER)); + tAuthenticateReq.setPassword(sessConfMap.get(JdbcConnectionParams.AUTH_PASSWD)); } try { - TOpenSessionResp openResp = client.OpenSession(openReq); + TOpenSessionResp openResp = client.OpenSession(openReq, tAuthenticateReq); // validate connection Utils.verifySuccess(openResp.getStatus()); diff --git service-rpc/if/TCLIService.thrift service-rpc/if/TCLIService.thrift index 1cf8a918a3..55ddb724a9 100644 --- service-rpc/if/TCLIService.thrift +++ service-rpc/if/TCLIService.thrift @@ -570,17 +570,19 @@ struct TOpenSessionReq { // The version of the HiveServer2 protocol that the client is using. 1: required TProtocolVersion client_protocol = TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V10 + // Configuration overlay which is applied when the session is + // first created. + 2: optional map configuration +} + +struct TAuthenticateReq { // Username and password for authentication. // Depending on the authentication scheme being used, // this information may instead be provided by a lower // protocol layer, in which case these fields may be // left unset. - 2: optional string username - 3: optional string password - - // Configuration overlay which is applied when the session is - // first created. - 4: optional map configuration + 1: optional string username + 2: optional string password } struct TOpenSessionResp { @@ -775,7 +777,7 @@ struct TGetCatalogsResp { // GetSchemas() // -// Retrieves the schema names available in this database. +// Retrieves the schema names available in this database. // The results are ordered by TABLE_CATALOG and TABLE_SCHEM. // col1 // name: TABLE_SCHEM @@ -1251,7 +1253,7 @@ struct TGetQueryIdResp { service TCLIService { - TOpenSessionResp OpenSession(1:TOpenSessionReq req); + TOpenSessionResp OpenSession(1:TOpenSessionReq req, TAuthenticateReq tAuthenticateReq); TCloseSessionResp CloseSession(1:TCloseSessionReq req); diff --git service-rpc/src/gen/thrift/gen-cpp/TCLIService.cpp service-rpc/src/gen/thrift/gen-cpp/TCLIService.cpp index 501341f3a4..e10528a848 100644 --- service-rpc/src/gen/thrift/gen-cpp/TCLIService.cpp +++ service-rpc/src/gen/thrift/gen-cpp/TCLIService.cpp @@ -42,6 +42,14 @@ uint32_t TCLIService_OpenSession_args::read(::apache::thrift::protocol::TProtoco xfer += iprot->skip(ftype); } break; + case -1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tAuthenticateReq.read(iprot); + this->__isset.tAuthenticateReq = true; + } else { + xfer += iprot->skip(ftype); + } + break; default: xfer += iprot->skip(ftype); break; @@ -59,6 +67,10 @@ uint32_t TCLIService_OpenSession_args::write(::apache::thrift::protocol::TProtoc apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("TCLIService_OpenSession_args"); + xfer += oprot->writeFieldBegin("tAuthenticateReq", ::apache::thrift::protocol::T_STRUCT, -1); + xfer += this->tAuthenticateReq.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->req.write(oprot); xfer += oprot->writeFieldEnd(); @@ -78,6 +90,10 @@ uint32_t TCLIService_OpenSession_pargs::write(::apache::thrift::protocol::TProto apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("TCLIService_OpenSession_pargs"); + xfer += oprot->writeFieldBegin("tAuthenticateReq", ::apache::thrift::protocol::T_STRUCT, -1); + xfer += (*(this->tAuthenticateReq)).write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); xfer += (*(this->req)).write(oprot); xfer += oprot->writeFieldEnd(); @@ -4309,19 +4325,20 @@ uint32_t TCLIService_SetClientInfo_presult::read(::apache::thrift::protocol::TPr return xfer; } -void TCLIServiceClient::OpenSession(TOpenSessionResp& _return, const TOpenSessionReq& req) +void TCLIServiceClient::OpenSession(TOpenSessionResp& _return, const TOpenSessionReq& req, const TAuthenticateReq& tAuthenticateReq) { - send_OpenSession(req); + send_OpenSession(req, tAuthenticateReq); recv_OpenSession(_return); } -void TCLIServiceClient::send_OpenSession(const TOpenSessionReq& req) +void TCLIServiceClient::send_OpenSession(const TOpenSessionReq& req, const TAuthenticateReq& tAuthenticateReq) { int32_t cseqid = 0; oprot_->writeMessageBegin("OpenSession", ::apache::thrift::protocol::T_CALL, cseqid); TCLIService_OpenSession_pargs args; args.req = &req; + args.tAuthenticateReq = &tAuthenticateReq; args.write(oprot_); oprot_->writeMessageEnd(); @@ -5685,7 +5702,7 @@ void TCLIServiceProcessor::process_OpenSession(int32_t seqid, ::apache::thrift:: TCLIService_OpenSession_result result; try { - iface_->OpenSession(result.success, args.req); + iface_->OpenSession(result.success, args.req, args.tAuthenticateReq); result.__isset.success = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { @@ -6911,13 +6928,13 @@ void TCLIServiceProcessor::process_SetClientInfo(int32_t seqid, ::apache::thrift return processor; } -void TCLIServiceConcurrentClient::OpenSession(TOpenSessionResp& _return, const TOpenSessionReq& req) +void TCLIServiceConcurrentClient::OpenSession(TOpenSessionResp& _return, const TOpenSessionReq& req, const TAuthenticateReq& tAuthenticateReq) { - int32_t seqid = send_OpenSession(req); + int32_t seqid = send_OpenSession(req, tAuthenticateReq); recv_OpenSession(_return, seqid); } -int32_t TCLIServiceConcurrentClient::send_OpenSession(const TOpenSessionReq& req) +int32_t TCLIServiceConcurrentClient::send_OpenSession(const TOpenSessionReq& req, const TAuthenticateReq& tAuthenticateReq) { int32_t cseqid = this->sync_.generateSeqId(); ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); @@ -6925,6 +6942,7 @@ int32_t TCLIServiceConcurrentClient::send_OpenSession(const TOpenSessionReq& req TCLIService_OpenSession_pargs args; args.req = &req; + args.tAuthenticateReq = &tAuthenticateReq; args.write(oprot_); oprot_->writeMessageEnd(); diff --git service-rpc/src/gen/thrift/gen-cpp/TCLIService.h service-rpc/src/gen/thrift/gen-cpp/TCLIService.h index b62234aa34..e4dd094db9 100644 --- service-rpc/src/gen/thrift/gen-cpp/TCLIService.h +++ service-rpc/src/gen/thrift/gen-cpp/TCLIService.h @@ -21,7 +21,7 @@ namespace apache { namespace hive { namespace service { namespace rpc { namespac class TCLIServiceIf { public: virtual ~TCLIServiceIf() {} - virtual void OpenSession(TOpenSessionResp& _return, const TOpenSessionReq& req) = 0; + virtual void OpenSession(TOpenSessionResp& _return, const TOpenSessionReq& req, const TAuthenticateReq& tAuthenticateReq) = 0; virtual void CloseSession(TCloseSessionResp& _return, const TCloseSessionReq& req) = 0; virtual void GetInfo(TGetInfoResp& _return, const TGetInfoReq& req) = 0; virtual void ExecuteStatement(TExecuteStatementResp& _return, const TExecuteStatementReq& req) = 0; @@ -73,7 +73,7 @@ class TCLIServiceIfSingletonFactory : virtual public TCLIServiceIfFactory { class TCLIServiceNull : virtual public TCLIServiceIf { public: virtual ~TCLIServiceNull() {} - void OpenSession(TOpenSessionResp& /* _return */, const TOpenSessionReq& /* req */) { + void OpenSession(TOpenSessionResp& /* _return */, const TOpenSessionReq& /* req */, const TAuthenticateReq& /* tAuthenticateReq */) { return; } void CloseSession(TCloseSessionResp& /* _return */, const TCloseSessionReq& /* req */) { @@ -145,8 +145,9 @@ class TCLIServiceNull : virtual public TCLIServiceIf { }; typedef struct _TCLIService_OpenSession_args__isset { - _TCLIService_OpenSession_args__isset() : req(false) {} + _TCLIService_OpenSession_args__isset() : req(false), tAuthenticateReq(false) {} bool req :1; + bool tAuthenticateReq :1; } _TCLIService_OpenSession_args__isset; class TCLIService_OpenSession_args { @@ -159,15 +160,20 @@ class TCLIService_OpenSession_args { virtual ~TCLIService_OpenSession_args() throw(); TOpenSessionReq req; + TAuthenticateReq tAuthenticateReq; _TCLIService_OpenSession_args__isset __isset; void __set_req(const TOpenSessionReq& val); + void __set_tAuthenticateReq(const TAuthenticateReq& val); + bool operator == (const TCLIService_OpenSession_args & rhs) const { if (!(req == rhs.req)) return false; + if (!(tAuthenticateReq == rhs.tAuthenticateReq)) + return false; return true; } bool operator != (const TCLIService_OpenSession_args &rhs) const { @@ -188,6 +194,7 @@ class TCLIService_OpenSession_pargs { virtual ~TCLIService_OpenSession_pargs() throw(); const TOpenSessionReq* req; + const TAuthenticateReq* tAuthenticateReq; uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; @@ -2561,8 +2568,8 @@ class TCLIServiceClient : virtual public TCLIServiceIf { boost::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() { return poprot_; } - void OpenSession(TOpenSessionResp& _return, const TOpenSessionReq& req); - void send_OpenSession(const TOpenSessionReq& req); + void OpenSession(TOpenSessionResp& _return, const TOpenSessionReq& req, const TAuthenticateReq& tAuthenticateReq); + void send_OpenSession(const TOpenSessionReq& req, const TAuthenticateReq& tAuthenticateReq); void recv_OpenSession(TOpenSessionResp& _return); void CloseSession(TCloseSessionResp& _return, const TCloseSessionReq& req); void send_CloseSession(const TCloseSessionReq& req); @@ -2722,13 +2729,13 @@ class TCLIServiceMultiface : virtual public TCLIServiceIf { ifaces_.push_back(iface); } public: - void OpenSession(TOpenSessionResp& _return, const TOpenSessionReq& req) { + void OpenSession(TOpenSessionResp& _return, const TOpenSessionReq& req, const TAuthenticateReq& tAuthenticateReq) { size_t sz = ifaces_.size(); size_t i = 0; for (; i < (sz - 1); ++i) { - ifaces_[i]->OpenSession(_return, req); + ifaces_[i]->OpenSession(_return, req, tAuthenticateReq); } - ifaces_[i]->OpenSession(_return, req); + ifaces_[i]->OpenSession(_return, req, tAuthenticateReq); return; } @@ -2982,8 +2989,8 @@ class TCLIServiceConcurrentClient : virtual public TCLIServiceIf { boost::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() { return poprot_; } - void OpenSession(TOpenSessionResp& _return, const TOpenSessionReq& req); - int32_t send_OpenSession(const TOpenSessionReq& req); + void OpenSession(TOpenSessionResp& _return, const TOpenSessionReq& req, const TAuthenticateReq& tAuthenticateReq); + int32_t send_OpenSession(const TOpenSessionReq& req, const TAuthenticateReq& tAuthenticateReq); void recv_OpenSession(TOpenSessionResp& _return, const int32_t seqid); void CloseSession(TCloseSessionResp& _return, const TCloseSessionReq& req); int32_t send_CloseSession(const TCloseSessionReq& req); diff --git service-rpc/src/gen/thrift/gen-cpp/TCLIService_server.skeleton.cpp service-rpc/src/gen/thrift/gen-cpp/TCLIService_server.skeleton.cpp index bdf88144f4..89228f692b 100644 --- service-rpc/src/gen/thrift/gen-cpp/TCLIService_server.skeleton.cpp +++ service-rpc/src/gen/thrift/gen-cpp/TCLIService_server.skeleton.cpp @@ -22,7 +22,7 @@ class TCLIServiceHandler : virtual public TCLIServiceIf { // Your initialization goes here } - void OpenSession(TOpenSessionResp& _return, const TOpenSessionReq& req) { + void OpenSession(TOpenSessionResp& _return, const TOpenSessionReq& req, const TAuthenticateReq& tAuthenticateReq) { // Your implementation goes here printf("OpenSession\n"); } diff --git service-rpc/src/gen/thrift/gen-cpp/TCLIService_types.cpp service-rpc/src/gen/thrift/gen-cpp/TCLIService_types.cpp index d312896c72..bf7fae65ef 100644 --- service-rpc/src/gen/thrift/gen-cpp/TCLIService_types.cpp +++ service-rpc/src/gen/thrift/gen-cpp/TCLIService_types.cpp @@ -4644,16 +4644,6 @@ void TOpenSessionReq::__set_client_protocol(const TProtocolVersion::type val) { this->client_protocol = val; } -void TOpenSessionReq::__set_username(const std::string& val) { - this->username = val; -__isset.username = true; -} - -void TOpenSessionReq::__set_password(const std::string& val) { - this->password = val; -__isset.password = true; -} - void TOpenSessionReq::__set_configuration(const std::map & val) { this->configuration = val; __isset.configuration = true; @@ -4692,22 +4682,6 @@ uint32_t TOpenSessionReq::read(::apache::thrift::protocol::TProtocol* iprot) { } break; case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->username); - this->__isset.username = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->password); - this->__isset.password = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: if (ftype == ::apache::thrift::protocol::T_MAP) { { this->configuration.clear(); @@ -4753,18 +4727,8 @@ uint32_t TOpenSessionReq::write(::apache::thrift::protocol::TProtocol* oprot) co xfer += oprot->writeI32((int32_t)this->client_protocol); xfer += oprot->writeFieldEnd(); - if (this->__isset.username) { - xfer += oprot->writeFieldBegin("username", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->username); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.password) { - xfer += oprot->writeFieldBegin("password", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->password); - xfer += oprot->writeFieldEnd(); - } if (this->__isset.configuration) { - xfer += oprot->writeFieldBegin("configuration", ::apache::thrift::protocol::T_MAP, 4); + xfer += oprot->writeFieldBegin("configuration", ::apache::thrift::protocol::T_MAP, 2); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->configuration.size())); std::map ::const_iterator _iter189; @@ -4785,23 +4749,17 @@ uint32_t TOpenSessionReq::write(::apache::thrift::protocol::TProtocol* oprot) co void swap(TOpenSessionReq &a, TOpenSessionReq &b) { using ::std::swap; swap(a.client_protocol, b.client_protocol); - swap(a.username, b.username); - swap(a.password, b.password); swap(a.configuration, b.configuration); swap(a.__isset, b.__isset); } TOpenSessionReq::TOpenSessionReq(const TOpenSessionReq& other190) { client_protocol = other190.client_protocol; - username = other190.username; - password = other190.password; configuration = other190.configuration; __isset = other190.__isset; } TOpenSessionReq& TOpenSessionReq::operator=(const TOpenSessionReq& other191) { client_protocol = other191.client_protocol; - username = other191.username; - password = other191.password; configuration = other191.configuration; __isset = other191.__isset; return *this; @@ -4810,13 +4768,121 @@ void TOpenSessionReq::printTo(std::ostream& out) const { using ::apache::thrift::to_string; out << "TOpenSessionReq("; out << "client_protocol=" << to_string(client_protocol); - out << ", " << "username="; (__isset.username ? (out << to_string(username)) : (out << "")); - out << ", " << "password="; (__isset.password ? (out << to_string(password)) : (out << "")); out << ", " << "configuration="; (__isset.configuration ? (out << to_string(configuration)) : (out << "")); out << ")"; } +TAuthenticateReq::~TAuthenticateReq() throw() { +} + + +void TAuthenticateReq::__set_username(const std::string& val) { + this->username = val; +__isset.username = true; +} + +void TAuthenticateReq::__set_password(const std::string& val) { + this->password = val; +__isset.password = true; +} + +uint32_t TAuthenticateReq::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->username); + this->__isset.username = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->password); + this->__isset.password = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TAuthenticateReq::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TAuthenticateReq"); + + if (this->__isset.username) { + xfer += oprot->writeFieldBegin("username", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->username); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.password) { + xfer += oprot->writeFieldBegin("password", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->password); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(TAuthenticateReq &a, TAuthenticateReq &b) { + using ::std::swap; + swap(a.username, b.username); + swap(a.password, b.password); + swap(a.__isset, b.__isset); +} + +TAuthenticateReq::TAuthenticateReq(const TAuthenticateReq& other192) { + username = other192.username; + password = other192.password; + __isset = other192.__isset; +} +TAuthenticateReq& TAuthenticateReq::operator=(const TAuthenticateReq& other193) { + username = other193.username; + password = other193.password; + __isset = other193.__isset; + return *this; +} +void TAuthenticateReq::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "TAuthenticateReq("; + out << "username="; (__isset.username ? (out << to_string(username)) : (out << "")); + out << ", " << "password="; (__isset.password ? (out << to_string(password)) : (out << "")); + out << ")"; +} + + TOpenSessionResp::~TOpenSessionResp() throw() { } @@ -4872,9 +4938,9 @@ uint32_t TOpenSessionResp::read(::apache::thrift::protocol::TProtocol* iprot) { break; case 2: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast192; - xfer += iprot->readI32(ecast192); - this->serverProtocolVersion = (TProtocolVersion::type)ecast192; + int32_t ecast194; + xfer += iprot->readI32(ecast194); + this->serverProtocolVersion = (TProtocolVersion::type)ecast194; isset_serverProtocolVersion = true; } else { xfer += iprot->skip(ftype); @@ -4892,17 +4958,17 @@ uint32_t TOpenSessionResp::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_MAP) { { this->configuration.clear(); - uint32_t _size193; - ::apache::thrift::protocol::TType _ktype194; - ::apache::thrift::protocol::TType _vtype195; - xfer += iprot->readMapBegin(_ktype194, _vtype195, _size193); - uint32_t _i197; - for (_i197 = 0; _i197 < _size193; ++_i197) + uint32_t _size195; + ::apache::thrift::protocol::TType _ktype196; + ::apache::thrift::protocol::TType _vtype197; + xfer += iprot->readMapBegin(_ktype196, _vtype197, _size195); + uint32_t _i199; + for (_i199 = 0; _i199 < _size195; ++_i199) { - std::string _key198; - xfer += iprot->readString(_key198); - std::string& _val199 = this->configuration[_key198]; - xfer += iprot->readString(_val199); + std::string _key200; + xfer += iprot->readString(_key200); + std::string& _val201 = this->configuration[_key200]; + xfer += iprot->readString(_val201); } xfer += iprot->readMapEnd(); } @@ -4949,11 +5015,11 @@ uint32_t TOpenSessionResp::write(::apache::thrift::protocol::TProtocol* oprot) c xfer += oprot->writeFieldBegin("configuration", ::apache::thrift::protocol::T_MAP, 4); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->configuration.size())); - std::map ::const_iterator _iter200; - for (_iter200 = this->configuration.begin(); _iter200 != this->configuration.end(); ++_iter200) + std::map ::const_iterator _iter202; + for (_iter202 = this->configuration.begin(); _iter202 != this->configuration.end(); ++_iter202) { - xfer += oprot->writeString(_iter200->first); - xfer += oprot->writeString(_iter200->second); + xfer += oprot->writeString(_iter202->first); + xfer += oprot->writeString(_iter202->second); } xfer += oprot->writeMapEnd(); } @@ -4973,19 +5039,19 @@ void swap(TOpenSessionResp &a, TOpenSessionResp &b) { swap(a.__isset, b.__isset); } -TOpenSessionResp::TOpenSessionResp(const TOpenSessionResp& other201) { - status = other201.status; - serverProtocolVersion = other201.serverProtocolVersion; - sessionHandle = other201.sessionHandle; - configuration = other201.configuration; - __isset = other201.__isset; +TOpenSessionResp::TOpenSessionResp(const TOpenSessionResp& other203) { + status = other203.status; + serverProtocolVersion = other203.serverProtocolVersion; + sessionHandle = other203.sessionHandle; + configuration = other203.configuration; + __isset = other203.__isset; } -TOpenSessionResp& TOpenSessionResp::operator=(const TOpenSessionResp& other202) { - status = other202.status; - serverProtocolVersion = other202.serverProtocolVersion; - sessionHandle = other202.sessionHandle; - configuration = other202.configuration; - __isset = other202.__isset; +TOpenSessionResp& TOpenSessionResp::operator=(const TOpenSessionResp& other204) { + status = other204.status; + serverProtocolVersion = other204.serverProtocolVersion; + sessionHandle = other204.sessionHandle; + configuration = other204.configuration; + __isset = other204.__isset; return *this; } void TOpenSessionResp::printTo(std::ostream& out) const { @@ -5046,17 +5112,17 @@ uint32_t TSetClientInfoReq::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_MAP) { { this->configuration.clear(); - uint32_t _size203; - ::apache::thrift::protocol::TType _ktype204; - ::apache::thrift::protocol::TType _vtype205; - xfer += iprot->readMapBegin(_ktype204, _vtype205, _size203); - uint32_t _i207; - for (_i207 = 0; _i207 < _size203; ++_i207) + uint32_t _size205; + ::apache::thrift::protocol::TType _ktype206; + ::apache::thrift::protocol::TType _vtype207; + xfer += iprot->readMapBegin(_ktype206, _vtype207, _size205); + uint32_t _i209; + for (_i209 = 0; _i209 < _size205; ++_i209) { - std::string _key208; - xfer += iprot->readString(_key208); - std::string& _val209 = this->configuration[_key208]; - xfer += iprot->readString(_val209); + std::string _key210; + xfer += iprot->readString(_key210); + std::string& _val211 = this->configuration[_key210]; + xfer += iprot->readString(_val211); } xfer += iprot->readMapEnd(); } @@ -5092,11 +5158,11 @@ uint32_t TSetClientInfoReq::write(::apache::thrift::protocol::TProtocol* oprot) xfer += oprot->writeFieldBegin("configuration", ::apache::thrift::protocol::T_MAP, 2); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->configuration.size())); - std::map ::const_iterator _iter210; - for (_iter210 = this->configuration.begin(); _iter210 != this->configuration.end(); ++_iter210) + std::map ::const_iterator _iter212; + for (_iter212 = this->configuration.begin(); _iter212 != this->configuration.end(); ++_iter212) { - xfer += oprot->writeString(_iter210->first); - xfer += oprot->writeString(_iter210->second); + xfer += oprot->writeString(_iter212->first); + xfer += oprot->writeString(_iter212->second); } xfer += oprot->writeMapEnd(); } @@ -5114,15 +5180,15 @@ void swap(TSetClientInfoReq &a, TSetClientInfoReq &b) { swap(a.__isset, b.__isset); } -TSetClientInfoReq::TSetClientInfoReq(const TSetClientInfoReq& other211) { - sessionHandle = other211.sessionHandle; - configuration = other211.configuration; - __isset = other211.__isset; +TSetClientInfoReq::TSetClientInfoReq(const TSetClientInfoReq& other213) { + sessionHandle = other213.sessionHandle; + configuration = other213.configuration; + __isset = other213.__isset; } -TSetClientInfoReq& TSetClientInfoReq::operator=(const TSetClientInfoReq& other212) { - sessionHandle = other212.sessionHandle; - configuration = other212.configuration; - __isset = other212.__isset; +TSetClientInfoReq& TSetClientInfoReq::operator=(const TSetClientInfoReq& other214) { + sessionHandle = other214.sessionHandle; + configuration = other214.configuration; + __isset = other214.__isset; return *this; } void TSetClientInfoReq::printTo(std::ostream& out) const { @@ -5205,11 +5271,11 @@ void swap(TSetClientInfoResp &a, TSetClientInfoResp &b) { swap(a.status, b.status); } -TSetClientInfoResp::TSetClientInfoResp(const TSetClientInfoResp& other213) { - status = other213.status; +TSetClientInfoResp::TSetClientInfoResp(const TSetClientInfoResp& other215) { + status = other215.status; } -TSetClientInfoResp& TSetClientInfoResp::operator=(const TSetClientInfoResp& other214) { - status = other214.status; +TSetClientInfoResp& TSetClientInfoResp::operator=(const TSetClientInfoResp& other216) { + status = other216.status; return *this; } void TSetClientInfoResp::printTo(std::ostream& out) const { @@ -5291,11 +5357,11 @@ void swap(TCloseSessionReq &a, TCloseSessionReq &b) { swap(a.sessionHandle, b.sessionHandle); } -TCloseSessionReq::TCloseSessionReq(const TCloseSessionReq& other215) { - sessionHandle = other215.sessionHandle; +TCloseSessionReq::TCloseSessionReq(const TCloseSessionReq& other217) { + sessionHandle = other217.sessionHandle; } -TCloseSessionReq& TCloseSessionReq::operator=(const TCloseSessionReq& other216) { - sessionHandle = other216.sessionHandle; +TCloseSessionReq& TCloseSessionReq::operator=(const TCloseSessionReq& other218) { + sessionHandle = other218.sessionHandle; return *this; } void TCloseSessionReq::printTo(std::ostream& out) const { @@ -5377,11 +5443,11 @@ void swap(TCloseSessionResp &a, TCloseSessionResp &b) { swap(a.status, b.status); } -TCloseSessionResp::TCloseSessionResp(const TCloseSessionResp& other217) { - status = other217.status; +TCloseSessionResp::TCloseSessionResp(const TCloseSessionResp& other219) { + status = other219.status; } -TCloseSessionResp& TCloseSessionResp::operator=(const TCloseSessionResp& other218) { - status = other218.status; +TCloseSessionResp& TCloseSessionResp::operator=(const TCloseSessionResp& other220) { + status = other220.status; return *this; } void TCloseSessionResp::printTo(std::ostream& out) const { @@ -5546,23 +5612,23 @@ void swap(TGetInfoValue &a, TGetInfoValue &b) { swap(a.__isset, b.__isset); } -TGetInfoValue::TGetInfoValue(const TGetInfoValue& other219) { - stringValue = other219.stringValue; - smallIntValue = other219.smallIntValue; - integerBitmask = other219.integerBitmask; - integerFlag = other219.integerFlag; - binaryValue = other219.binaryValue; - lenValue = other219.lenValue; - __isset = other219.__isset; -} -TGetInfoValue& TGetInfoValue::operator=(const TGetInfoValue& other220) { - stringValue = other220.stringValue; - smallIntValue = other220.smallIntValue; - integerBitmask = other220.integerBitmask; - integerFlag = other220.integerFlag; - binaryValue = other220.binaryValue; - lenValue = other220.lenValue; - __isset = other220.__isset; +TGetInfoValue::TGetInfoValue(const TGetInfoValue& other221) { + stringValue = other221.stringValue; + smallIntValue = other221.smallIntValue; + integerBitmask = other221.integerBitmask; + integerFlag = other221.integerFlag; + binaryValue = other221.binaryValue; + lenValue = other221.lenValue; + __isset = other221.__isset; +} +TGetInfoValue& TGetInfoValue::operator=(const TGetInfoValue& other222) { + stringValue = other222.stringValue; + smallIntValue = other222.smallIntValue; + integerBitmask = other222.integerBitmask; + integerFlag = other222.integerFlag; + binaryValue = other222.binaryValue; + lenValue = other222.lenValue; + __isset = other222.__isset; return *this; } void TGetInfoValue::printTo(std::ostream& out) const { @@ -5623,9 +5689,9 @@ uint32_t TGetInfoReq::read(::apache::thrift::protocol::TProtocol* iprot) { break; case 2: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast221; - xfer += iprot->readI32(ecast221); - this->infoType = (TGetInfoType::type)ecast221; + int32_t ecast223; + xfer += iprot->readI32(ecast223); + this->infoType = (TGetInfoType::type)ecast223; isset_infoType = true; } else { xfer += iprot->skip(ftype); @@ -5671,13 +5737,13 @@ void swap(TGetInfoReq &a, TGetInfoReq &b) { swap(a.infoType, b.infoType); } -TGetInfoReq::TGetInfoReq(const TGetInfoReq& other222) { - sessionHandle = other222.sessionHandle; - infoType = other222.infoType; +TGetInfoReq::TGetInfoReq(const TGetInfoReq& other224) { + sessionHandle = other224.sessionHandle; + infoType = other224.infoType; } -TGetInfoReq& TGetInfoReq::operator=(const TGetInfoReq& other223) { - sessionHandle = other223.sessionHandle; - infoType = other223.infoType; +TGetInfoReq& TGetInfoReq::operator=(const TGetInfoReq& other225) { + sessionHandle = other225.sessionHandle; + infoType = other225.infoType; return *this; } void TGetInfoReq::printTo(std::ostream& out) const { @@ -5780,13 +5846,13 @@ void swap(TGetInfoResp &a, TGetInfoResp &b) { swap(a.infoValue, b.infoValue); } -TGetInfoResp::TGetInfoResp(const TGetInfoResp& other224) { - status = other224.status; - infoValue = other224.infoValue; +TGetInfoResp::TGetInfoResp(const TGetInfoResp& other226) { + status = other226.status; + infoValue = other226.infoValue; } -TGetInfoResp& TGetInfoResp::operator=(const TGetInfoResp& other225) { - status = other225.status; - infoValue = other225.infoValue; +TGetInfoResp& TGetInfoResp::operator=(const TGetInfoResp& other227) { + status = other227.status; + infoValue = other227.infoValue; return *this; } void TGetInfoResp::printTo(std::ostream& out) const { @@ -5868,17 +5934,17 @@ uint32_t TExecuteStatementReq::read(::apache::thrift::protocol::TProtocol* iprot if (ftype == ::apache::thrift::protocol::T_MAP) { { this->confOverlay.clear(); - uint32_t _size226; - ::apache::thrift::protocol::TType _ktype227; - ::apache::thrift::protocol::TType _vtype228; - xfer += iprot->readMapBegin(_ktype227, _vtype228, _size226); - uint32_t _i230; - for (_i230 = 0; _i230 < _size226; ++_i230) + uint32_t _size228; + ::apache::thrift::protocol::TType _ktype229; + ::apache::thrift::protocol::TType _vtype230; + xfer += iprot->readMapBegin(_ktype229, _vtype230, _size228); + uint32_t _i232; + for (_i232 = 0; _i232 < _size228; ++_i232) { - std::string _key231; - xfer += iprot->readString(_key231); - std::string& _val232 = this->confOverlay[_key231]; - xfer += iprot->readString(_val232); + std::string _key233; + xfer += iprot->readString(_key233); + std::string& _val234 = this->confOverlay[_key233]; + xfer += iprot->readString(_val234); } xfer += iprot->readMapEnd(); } @@ -5936,11 +6002,11 @@ uint32_t TExecuteStatementReq::write(::apache::thrift::protocol::TProtocol* opro xfer += oprot->writeFieldBegin("confOverlay", ::apache::thrift::protocol::T_MAP, 3); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->confOverlay.size())); - std::map ::const_iterator _iter233; - for (_iter233 = this->confOverlay.begin(); _iter233 != this->confOverlay.end(); ++_iter233) + std::map ::const_iterator _iter235; + for (_iter235 = this->confOverlay.begin(); _iter235 != this->confOverlay.end(); ++_iter235) { - xfer += oprot->writeString(_iter233->first); - xfer += oprot->writeString(_iter233->second); + xfer += oprot->writeString(_iter235->first); + xfer += oprot->writeString(_iter235->second); } xfer += oprot->writeMapEnd(); } @@ -5971,21 +6037,21 @@ void swap(TExecuteStatementReq &a, TExecuteStatementReq &b) { swap(a.__isset, b.__isset); } -TExecuteStatementReq::TExecuteStatementReq(const TExecuteStatementReq& other234) { - sessionHandle = other234.sessionHandle; - statement = other234.statement; - confOverlay = other234.confOverlay; - runAsync = other234.runAsync; - queryTimeout = other234.queryTimeout; - __isset = other234.__isset; -} -TExecuteStatementReq& TExecuteStatementReq::operator=(const TExecuteStatementReq& other235) { - sessionHandle = other235.sessionHandle; - statement = other235.statement; - confOverlay = other235.confOverlay; - runAsync = other235.runAsync; - queryTimeout = other235.queryTimeout; - __isset = other235.__isset; +TExecuteStatementReq::TExecuteStatementReq(const TExecuteStatementReq& other236) { + sessionHandle = other236.sessionHandle; + statement = other236.statement; + confOverlay = other236.confOverlay; + runAsync = other236.runAsync; + queryTimeout = other236.queryTimeout; + __isset = other236.__isset; +} +TExecuteStatementReq& TExecuteStatementReq::operator=(const TExecuteStatementReq& other237) { + sessionHandle = other237.sessionHandle; + statement = other237.statement; + confOverlay = other237.confOverlay; + runAsync = other237.runAsync; + queryTimeout = other237.queryTimeout; + __isset = other237.__isset; return *this; } void TExecuteStatementReq::printTo(std::ostream& out) const { @@ -6091,15 +6157,15 @@ void swap(TExecuteStatementResp &a, TExecuteStatementResp &b) { swap(a.__isset, b.__isset); } -TExecuteStatementResp::TExecuteStatementResp(const TExecuteStatementResp& other236) { - status = other236.status; - operationHandle = other236.operationHandle; - __isset = other236.__isset; +TExecuteStatementResp::TExecuteStatementResp(const TExecuteStatementResp& other238) { + status = other238.status; + operationHandle = other238.operationHandle; + __isset = other238.__isset; } -TExecuteStatementResp& TExecuteStatementResp::operator=(const TExecuteStatementResp& other237) { - status = other237.status; - operationHandle = other237.operationHandle; - __isset = other237.__isset; +TExecuteStatementResp& TExecuteStatementResp::operator=(const TExecuteStatementResp& other239) { + status = other239.status; + operationHandle = other239.operationHandle; + __isset = other239.__isset; return *this; } void TExecuteStatementResp::printTo(std::ostream& out) const { @@ -6182,11 +6248,11 @@ void swap(TGetTypeInfoReq &a, TGetTypeInfoReq &b) { swap(a.sessionHandle, b.sessionHandle); } -TGetTypeInfoReq::TGetTypeInfoReq(const TGetTypeInfoReq& other238) { - sessionHandle = other238.sessionHandle; +TGetTypeInfoReq::TGetTypeInfoReq(const TGetTypeInfoReq& other240) { + sessionHandle = other240.sessionHandle; } -TGetTypeInfoReq& TGetTypeInfoReq::operator=(const TGetTypeInfoReq& other239) { - sessionHandle = other239.sessionHandle; +TGetTypeInfoReq& TGetTypeInfoReq::operator=(const TGetTypeInfoReq& other241) { + sessionHandle = other241.sessionHandle; return *this; } void TGetTypeInfoReq::printTo(std::ostream& out) const { @@ -6288,15 +6354,15 @@ void swap(TGetTypeInfoResp &a, TGetTypeInfoResp &b) { swap(a.__isset, b.__isset); } -TGetTypeInfoResp::TGetTypeInfoResp(const TGetTypeInfoResp& other240) { - status = other240.status; - operationHandle = other240.operationHandle; - __isset = other240.__isset; +TGetTypeInfoResp::TGetTypeInfoResp(const TGetTypeInfoResp& other242) { + status = other242.status; + operationHandle = other242.operationHandle; + __isset = other242.__isset; } -TGetTypeInfoResp& TGetTypeInfoResp::operator=(const TGetTypeInfoResp& other241) { - status = other241.status; - operationHandle = other241.operationHandle; - __isset = other241.__isset; +TGetTypeInfoResp& TGetTypeInfoResp::operator=(const TGetTypeInfoResp& other243) { + status = other243.status; + operationHandle = other243.operationHandle; + __isset = other243.__isset; return *this; } void TGetTypeInfoResp::printTo(std::ostream& out) const { @@ -6379,11 +6445,11 @@ void swap(TGetCatalogsReq &a, TGetCatalogsReq &b) { swap(a.sessionHandle, b.sessionHandle); } -TGetCatalogsReq::TGetCatalogsReq(const TGetCatalogsReq& other242) { - sessionHandle = other242.sessionHandle; +TGetCatalogsReq::TGetCatalogsReq(const TGetCatalogsReq& other244) { + sessionHandle = other244.sessionHandle; } -TGetCatalogsReq& TGetCatalogsReq::operator=(const TGetCatalogsReq& other243) { - sessionHandle = other243.sessionHandle; +TGetCatalogsReq& TGetCatalogsReq::operator=(const TGetCatalogsReq& other245) { + sessionHandle = other245.sessionHandle; return *this; } void TGetCatalogsReq::printTo(std::ostream& out) const { @@ -6485,15 +6551,15 @@ void swap(TGetCatalogsResp &a, TGetCatalogsResp &b) { swap(a.__isset, b.__isset); } -TGetCatalogsResp::TGetCatalogsResp(const TGetCatalogsResp& other244) { - status = other244.status; - operationHandle = other244.operationHandle; - __isset = other244.__isset; +TGetCatalogsResp::TGetCatalogsResp(const TGetCatalogsResp& other246) { + status = other246.status; + operationHandle = other246.operationHandle; + __isset = other246.__isset; } -TGetCatalogsResp& TGetCatalogsResp::operator=(const TGetCatalogsResp& other245) { - status = other245.status; - operationHandle = other245.operationHandle; - __isset = other245.__isset; +TGetCatalogsResp& TGetCatalogsResp::operator=(const TGetCatalogsResp& other247) { + status = other247.status; + operationHandle = other247.operationHandle; + __isset = other247.__isset; return *this; } void TGetCatalogsResp::printTo(std::ostream& out) const { @@ -6615,17 +6681,17 @@ void swap(TGetSchemasReq &a, TGetSchemasReq &b) { swap(a.__isset, b.__isset); } -TGetSchemasReq::TGetSchemasReq(const TGetSchemasReq& other246) { - sessionHandle = other246.sessionHandle; - catalogName = other246.catalogName; - schemaName = other246.schemaName; - __isset = other246.__isset; +TGetSchemasReq::TGetSchemasReq(const TGetSchemasReq& other248) { + sessionHandle = other248.sessionHandle; + catalogName = other248.catalogName; + schemaName = other248.schemaName; + __isset = other248.__isset; } -TGetSchemasReq& TGetSchemasReq::operator=(const TGetSchemasReq& other247) { - sessionHandle = other247.sessionHandle; - catalogName = other247.catalogName; - schemaName = other247.schemaName; - __isset = other247.__isset; +TGetSchemasReq& TGetSchemasReq::operator=(const TGetSchemasReq& other249) { + sessionHandle = other249.sessionHandle; + catalogName = other249.catalogName; + schemaName = other249.schemaName; + __isset = other249.__isset; return *this; } void TGetSchemasReq::printTo(std::ostream& out) const { @@ -6729,15 +6795,15 @@ void swap(TGetSchemasResp &a, TGetSchemasResp &b) { swap(a.__isset, b.__isset); } -TGetSchemasResp::TGetSchemasResp(const TGetSchemasResp& other248) { - status = other248.status; - operationHandle = other248.operationHandle; - __isset = other248.__isset; +TGetSchemasResp::TGetSchemasResp(const TGetSchemasResp& other250) { + status = other250.status; + operationHandle = other250.operationHandle; + __isset = other250.__isset; } -TGetSchemasResp& TGetSchemasResp::operator=(const TGetSchemasResp& other249) { - status = other249.status; - operationHandle = other249.operationHandle; - __isset = other249.__isset; +TGetSchemasResp& TGetSchemasResp::operator=(const TGetSchemasResp& other251) { + status = other251.status; + operationHandle = other251.operationHandle; + __isset = other251.__isset; return *this; } void TGetSchemasResp::printTo(std::ostream& out) const { @@ -6835,14 +6901,14 @@ uint32_t TGetTablesReq::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->tableTypes.clear(); - uint32_t _size250; - ::apache::thrift::protocol::TType _etype253; - xfer += iprot->readListBegin(_etype253, _size250); - this->tableTypes.resize(_size250); - uint32_t _i254; - for (_i254 = 0; _i254 < _size250; ++_i254) + uint32_t _size252; + ::apache::thrift::protocol::TType _etype255; + xfer += iprot->readListBegin(_etype255, _size252); + this->tableTypes.resize(_size252); + uint32_t _i256; + for (_i256 = 0; _i256 < _size252; ++_i256) { - xfer += iprot->readString(this->tableTypes[_i254]); + xfer += iprot->readString(this->tableTypes[_i256]); } xfer += iprot->readListEnd(); } @@ -6893,10 +6959,10 @@ uint32_t TGetTablesReq::write(::apache::thrift::protocol::TProtocol* oprot) cons xfer += oprot->writeFieldBegin("tableTypes", ::apache::thrift::protocol::T_LIST, 5); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->tableTypes.size())); - std::vector ::const_iterator _iter255; - for (_iter255 = this->tableTypes.begin(); _iter255 != this->tableTypes.end(); ++_iter255) + std::vector ::const_iterator _iter257; + for (_iter257 = this->tableTypes.begin(); _iter257 != this->tableTypes.end(); ++_iter257) { - xfer += oprot->writeString((*_iter255)); + xfer += oprot->writeString((*_iter257)); } xfer += oprot->writeListEnd(); } @@ -6917,21 +6983,21 @@ void swap(TGetTablesReq &a, TGetTablesReq &b) { swap(a.__isset, b.__isset); } -TGetTablesReq::TGetTablesReq(const TGetTablesReq& other256) { - sessionHandle = other256.sessionHandle; - catalogName = other256.catalogName; - schemaName = other256.schemaName; - tableName = other256.tableName; - tableTypes = other256.tableTypes; - __isset = other256.__isset; -} -TGetTablesReq& TGetTablesReq::operator=(const TGetTablesReq& other257) { - sessionHandle = other257.sessionHandle; - catalogName = other257.catalogName; - schemaName = other257.schemaName; - tableName = other257.tableName; - tableTypes = other257.tableTypes; - __isset = other257.__isset; +TGetTablesReq::TGetTablesReq(const TGetTablesReq& other258) { + sessionHandle = other258.sessionHandle; + catalogName = other258.catalogName; + schemaName = other258.schemaName; + tableName = other258.tableName; + tableTypes = other258.tableTypes; + __isset = other258.__isset; +} +TGetTablesReq& TGetTablesReq::operator=(const TGetTablesReq& other259) { + sessionHandle = other259.sessionHandle; + catalogName = other259.catalogName; + schemaName = other259.schemaName; + tableName = other259.tableName; + tableTypes = other259.tableTypes; + __isset = other259.__isset; return *this; } void TGetTablesReq::printTo(std::ostream& out) const { @@ -7037,15 +7103,15 @@ void swap(TGetTablesResp &a, TGetTablesResp &b) { swap(a.__isset, b.__isset); } -TGetTablesResp::TGetTablesResp(const TGetTablesResp& other258) { - status = other258.status; - operationHandle = other258.operationHandle; - __isset = other258.__isset; +TGetTablesResp::TGetTablesResp(const TGetTablesResp& other260) { + status = other260.status; + operationHandle = other260.operationHandle; + __isset = other260.__isset; } -TGetTablesResp& TGetTablesResp::operator=(const TGetTablesResp& other259) { - status = other259.status; - operationHandle = other259.operationHandle; - __isset = other259.__isset; +TGetTablesResp& TGetTablesResp::operator=(const TGetTablesResp& other261) { + status = other261.status; + operationHandle = other261.operationHandle; + __isset = other261.__isset; return *this; } void TGetTablesResp::printTo(std::ostream& out) const { @@ -7128,11 +7194,11 @@ void swap(TGetTableTypesReq &a, TGetTableTypesReq &b) { swap(a.sessionHandle, b.sessionHandle); } -TGetTableTypesReq::TGetTableTypesReq(const TGetTableTypesReq& other260) { - sessionHandle = other260.sessionHandle; +TGetTableTypesReq::TGetTableTypesReq(const TGetTableTypesReq& other262) { + sessionHandle = other262.sessionHandle; } -TGetTableTypesReq& TGetTableTypesReq::operator=(const TGetTableTypesReq& other261) { - sessionHandle = other261.sessionHandle; +TGetTableTypesReq& TGetTableTypesReq::operator=(const TGetTableTypesReq& other263) { + sessionHandle = other263.sessionHandle; return *this; } void TGetTableTypesReq::printTo(std::ostream& out) const { @@ -7234,15 +7300,15 @@ void swap(TGetTableTypesResp &a, TGetTableTypesResp &b) { swap(a.__isset, b.__isset); } -TGetTableTypesResp::TGetTableTypesResp(const TGetTableTypesResp& other262) { - status = other262.status; - operationHandle = other262.operationHandle; - __isset = other262.__isset; +TGetTableTypesResp::TGetTableTypesResp(const TGetTableTypesResp& other264) { + status = other264.status; + operationHandle = other264.operationHandle; + __isset = other264.__isset; } -TGetTableTypesResp& TGetTableTypesResp::operator=(const TGetTableTypesResp& other263) { - status = other263.status; - operationHandle = other263.operationHandle; - __isset = other263.__isset; +TGetTableTypesResp& TGetTableTypesResp::operator=(const TGetTableTypesResp& other265) { + status = other265.status; + operationHandle = other265.operationHandle; + __isset = other265.__isset; return *this; } void TGetTableTypesResp::printTo(std::ostream& out) const { @@ -7402,21 +7468,21 @@ void swap(TGetColumnsReq &a, TGetColumnsReq &b) { swap(a.__isset, b.__isset); } -TGetColumnsReq::TGetColumnsReq(const TGetColumnsReq& other264) { - sessionHandle = other264.sessionHandle; - catalogName = other264.catalogName; - schemaName = other264.schemaName; - tableName = other264.tableName; - columnName = other264.columnName; - __isset = other264.__isset; +TGetColumnsReq::TGetColumnsReq(const TGetColumnsReq& other266) { + sessionHandle = other266.sessionHandle; + catalogName = other266.catalogName; + schemaName = other266.schemaName; + tableName = other266.tableName; + columnName = other266.columnName; + __isset = other266.__isset; } -TGetColumnsReq& TGetColumnsReq::operator=(const TGetColumnsReq& other265) { - sessionHandle = other265.sessionHandle; - catalogName = other265.catalogName; - schemaName = other265.schemaName; - tableName = other265.tableName; - columnName = other265.columnName; - __isset = other265.__isset; +TGetColumnsReq& TGetColumnsReq::operator=(const TGetColumnsReq& other267) { + sessionHandle = other267.sessionHandle; + catalogName = other267.catalogName; + schemaName = other267.schemaName; + tableName = other267.tableName; + columnName = other267.columnName; + __isset = other267.__isset; return *this; } void TGetColumnsReq::printTo(std::ostream& out) const { @@ -7522,15 +7588,15 @@ void swap(TGetColumnsResp &a, TGetColumnsResp &b) { swap(a.__isset, b.__isset); } -TGetColumnsResp::TGetColumnsResp(const TGetColumnsResp& other266) { - status = other266.status; - operationHandle = other266.operationHandle; - __isset = other266.__isset; +TGetColumnsResp::TGetColumnsResp(const TGetColumnsResp& other268) { + status = other268.status; + operationHandle = other268.operationHandle; + __isset = other268.__isset; } -TGetColumnsResp& TGetColumnsResp::operator=(const TGetColumnsResp& other267) { - status = other267.status; - operationHandle = other267.operationHandle; - __isset = other267.__isset; +TGetColumnsResp& TGetColumnsResp::operator=(const TGetColumnsResp& other269) { + status = other269.status; + operationHandle = other269.operationHandle; + __isset = other269.__isset; return *this; } void TGetColumnsResp::printTo(std::ostream& out) const { @@ -7672,19 +7738,19 @@ void swap(TGetFunctionsReq &a, TGetFunctionsReq &b) { swap(a.__isset, b.__isset); } -TGetFunctionsReq::TGetFunctionsReq(const TGetFunctionsReq& other268) { - sessionHandle = other268.sessionHandle; - catalogName = other268.catalogName; - schemaName = other268.schemaName; - functionName = other268.functionName; - __isset = other268.__isset; +TGetFunctionsReq::TGetFunctionsReq(const TGetFunctionsReq& other270) { + sessionHandle = other270.sessionHandle; + catalogName = other270.catalogName; + schemaName = other270.schemaName; + functionName = other270.functionName; + __isset = other270.__isset; } -TGetFunctionsReq& TGetFunctionsReq::operator=(const TGetFunctionsReq& other269) { - sessionHandle = other269.sessionHandle; - catalogName = other269.catalogName; - schemaName = other269.schemaName; - functionName = other269.functionName; - __isset = other269.__isset; +TGetFunctionsReq& TGetFunctionsReq::operator=(const TGetFunctionsReq& other271) { + sessionHandle = other271.sessionHandle; + catalogName = other271.catalogName; + schemaName = other271.schemaName; + functionName = other271.functionName; + __isset = other271.__isset; return *this; } void TGetFunctionsReq::printTo(std::ostream& out) const { @@ -7789,15 +7855,15 @@ void swap(TGetFunctionsResp &a, TGetFunctionsResp &b) { swap(a.__isset, b.__isset); } -TGetFunctionsResp::TGetFunctionsResp(const TGetFunctionsResp& other270) { - status = other270.status; - operationHandle = other270.operationHandle; - __isset = other270.__isset; +TGetFunctionsResp::TGetFunctionsResp(const TGetFunctionsResp& other272) { + status = other272.status; + operationHandle = other272.operationHandle; + __isset = other272.__isset; } -TGetFunctionsResp& TGetFunctionsResp::operator=(const TGetFunctionsResp& other271) { - status = other271.status; - operationHandle = other271.operationHandle; - __isset = other271.__isset; +TGetFunctionsResp& TGetFunctionsResp::operator=(const TGetFunctionsResp& other273) { + status = other273.status; + operationHandle = other273.operationHandle; + __isset = other273.__isset; return *this; } void TGetFunctionsResp::printTo(std::ostream& out) const { @@ -7938,19 +8004,19 @@ void swap(TGetPrimaryKeysReq &a, TGetPrimaryKeysReq &b) { swap(a.__isset, b.__isset); } -TGetPrimaryKeysReq::TGetPrimaryKeysReq(const TGetPrimaryKeysReq& other272) { - sessionHandle = other272.sessionHandle; - catalogName = other272.catalogName; - schemaName = other272.schemaName; - tableName = other272.tableName; - __isset = other272.__isset; +TGetPrimaryKeysReq::TGetPrimaryKeysReq(const TGetPrimaryKeysReq& other274) { + sessionHandle = other274.sessionHandle; + catalogName = other274.catalogName; + schemaName = other274.schemaName; + tableName = other274.tableName; + __isset = other274.__isset; } -TGetPrimaryKeysReq& TGetPrimaryKeysReq::operator=(const TGetPrimaryKeysReq& other273) { - sessionHandle = other273.sessionHandle; - catalogName = other273.catalogName; - schemaName = other273.schemaName; - tableName = other273.tableName; - __isset = other273.__isset; +TGetPrimaryKeysReq& TGetPrimaryKeysReq::operator=(const TGetPrimaryKeysReq& other275) { + sessionHandle = other275.sessionHandle; + catalogName = other275.catalogName; + schemaName = other275.schemaName; + tableName = other275.tableName; + __isset = other275.__isset; return *this; } void TGetPrimaryKeysReq::printTo(std::ostream& out) const { @@ -8055,15 +8121,15 @@ void swap(TGetPrimaryKeysResp &a, TGetPrimaryKeysResp &b) { swap(a.__isset, b.__isset); } -TGetPrimaryKeysResp::TGetPrimaryKeysResp(const TGetPrimaryKeysResp& other274) { - status = other274.status; - operationHandle = other274.operationHandle; - __isset = other274.__isset; +TGetPrimaryKeysResp::TGetPrimaryKeysResp(const TGetPrimaryKeysResp& other276) { + status = other276.status; + operationHandle = other276.operationHandle; + __isset = other276.__isset; } -TGetPrimaryKeysResp& TGetPrimaryKeysResp::operator=(const TGetPrimaryKeysResp& other275) { - status = other275.status; - operationHandle = other275.operationHandle; - __isset = other275.__isset; +TGetPrimaryKeysResp& TGetPrimaryKeysResp::operator=(const TGetPrimaryKeysResp& other277) { + status = other277.status; + operationHandle = other277.operationHandle; + __isset = other277.__isset; return *this; } void TGetPrimaryKeysResp::printTo(std::ostream& out) const { @@ -8261,25 +8327,25 @@ void swap(TGetCrossReferenceReq &a, TGetCrossReferenceReq &b) { swap(a.__isset, b.__isset); } -TGetCrossReferenceReq::TGetCrossReferenceReq(const TGetCrossReferenceReq& other276) { - sessionHandle = other276.sessionHandle; - parentCatalogName = other276.parentCatalogName; - parentSchemaName = other276.parentSchemaName; - parentTableName = other276.parentTableName; - foreignCatalogName = other276.foreignCatalogName; - foreignSchemaName = other276.foreignSchemaName; - foreignTableName = other276.foreignTableName; - __isset = other276.__isset; +TGetCrossReferenceReq::TGetCrossReferenceReq(const TGetCrossReferenceReq& other278) { + sessionHandle = other278.sessionHandle; + parentCatalogName = other278.parentCatalogName; + parentSchemaName = other278.parentSchemaName; + parentTableName = other278.parentTableName; + foreignCatalogName = other278.foreignCatalogName; + foreignSchemaName = other278.foreignSchemaName; + foreignTableName = other278.foreignTableName; + __isset = other278.__isset; } -TGetCrossReferenceReq& TGetCrossReferenceReq::operator=(const TGetCrossReferenceReq& other277) { - sessionHandle = other277.sessionHandle; - parentCatalogName = other277.parentCatalogName; - parentSchemaName = other277.parentSchemaName; - parentTableName = other277.parentTableName; - foreignCatalogName = other277.foreignCatalogName; - foreignSchemaName = other277.foreignSchemaName; - foreignTableName = other277.foreignTableName; - __isset = other277.__isset; +TGetCrossReferenceReq& TGetCrossReferenceReq::operator=(const TGetCrossReferenceReq& other279) { + sessionHandle = other279.sessionHandle; + parentCatalogName = other279.parentCatalogName; + parentSchemaName = other279.parentSchemaName; + parentTableName = other279.parentTableName; + foreignCatalogName = other279.foreignCatalogName; + foreignSchemaName = other279.foreignSchemaName; + foreignTableName = other279.foreignTableName; + __isset = other279.__isset; return *this; } void TGetCrossReferenceReq::printTo(std::ostream& out) const { @@ -8387,15 +8453,15 @@ void swap(TGetCrossReferenceResp &a, TGetCrossReferenceResp &b) { swap(a.__isset, b.__isset); } -TGetCrossReferenceResp::TGetCrossReferenceResp(const TGetCrossReferenceResp& other278) { - status = other278.status; - operationHandle = other278.operationHandle; - __isset = other278.__isset; +TGetCrossReferenceResp::TGetCrossReferenceResp(const TGetCrossReferenceResp& other280) { + status = other280.status; + operationHandle = other280.operationHandle; + __isset = other280.__isset; } -TGetCrossReferenceResp& TGetCrossReferenceResp::operator=(const TGetCrossReferenceResp& other279) { - status = other279.status; - operationHandle = other279.operationHandle; - __isset = other279.__isset; +TGetCrossReferenceResp& TGetCrossReferenceResp::operator=(const TGetCrossReferenceResp& other281) { + status = other281.status; + operationHandle = other281.operationHandle; + __isset = other281.__isset; return *this; } void TGetCrossReferenceResp::printTo(std::ostream& out) const { @@ -8498,15 +8564,15 @@ void swap(TGetOperationStatusReq &a, TGetOperationStatusReq &b) { swap(a.__isset, b.__isset); } -TGetOperationStatusReq::TGetOperationStatusReq(const TGetOperationStatusReq& other280) { - operationHandle = other280.operationHandle; - getProgressUpdate = other280.getProgressUpdate; - __isset = other280.__isset; +TGetOperationStatusReq::TGetOperationStatusReq(const TGetOperationStatusReq& other282) { + operationHandle = other282.operationHandle; + getProgressUpdate = other282.getProgressUpdate; + __isset = other282.__isset; } -TGetOperationStatusReq& TGetOperationStatusReq::operator=(const TGetOperationStatusReq& other281) { - operationHandle = other281.operationHandle; - getProgressUpdate = other281.getProgressUpdate; - __isset = other281.__isset; +TGetOperationStatusReq& TGetOperationStatusReq::operator=(const TGetOperationStatusReq& other283) { + operationHandle = other283.operationHandle; + getProgressUpdate = other283.getProgressUpdate; + __isset = other283.__isset; return *this; } void TGetOperationStatusReq::printTo(std::ostream& out) const { @@ -8608,9 +8674,9 @@ uint32_t TGetOperationStatusResp::read(::apache::thrift::protocol::TProtocol* ip break; case 2: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast282; - xfer += iprot->readI32(ecast282); - this->operationState = (TOperationState::type)ecast282; + int32_t ecast284; + xfer += iprot->readI32(ecast284); + this->operationState = (TOperationState::type)ecast284; this->__isset.operationState = true; } else { xfer += iprot->skip(ftype); @@ -8782,33 +8848,33 @@ void swap(TGetOperationStatusResp &a, TGetOperationStatusResp &b) { swap(a.__isset, b.__isset); } -TGetOperationStatusResp::TGetOperationStatusResp(const TGetOperationStatusResp& other283) { - status = other283.status; - operationState = other283.operationState; - sqlState = other283.sqlState; - errorCode = other283.errorCode; - errorMessage = other283.errorMessage; - taskStatus = other283.taskStatus; - operationStarted = other283.operationStarted; - operationCompleted = other283.operationCompleted; - hasResultSet = other283.hasResultSet; - progressUpdateResponse = other283.progressUpdateResponse; - numModifiedRows = other283.numModifiedRows; - __isset = other283.__isset; -} -TGetOperationStatusResp& TGetOperationStatusResp::operator=(const TGetOperationStatusResp& other284) { - status = other284.status; - operationState = other284.operationState; - sqlState = other284.sqlState; - errorCode = other284.errorCode; - errorMessage = other284.errorMessage; - taskStatus = other284.taskStatus; - operationStarted = other284.operationStarted; - operationCompleted = other284.operationCompleted; - hasResultSet = other284.hasResultSet; - progressUpdateResponse = other284.progressUpdateResponse; - numModifiedRows = other284.numModifiedRows; - __isset = other284.__isset; +TGetOperationStatusResp::TGetOperationStatusResp(const TGetOperationStatusResp& other285) { + status = other285.status; + operationState = other285.operationState; + sqlState = other285.sqlState; + errorCode = other285.errorCode; + errorMessage = other285.errorMessage; + taskStatus = other285.taskStatus; + operationStarted = other285.operationStarted; + operationCompleted = other285.operationCompleted; + hasResultSet = other285.hasResultSet; + progressUpdateResponse = other285.progressUpdateResponse; + numModifiedRows = other285.numModifiedRows; + __isset = other285.__isset; +} +TGetOperationStatusResp& TGetOperationStatusResp::operator=(const TGetOperationStatusResp& other286) { + status = other286.status; + operationState = other286.operationState; + sqlState = other286.sqlState; + errorCode = other286.errorCode; + errorMessage = other286.errorMessage; + taskStatus = other286.taskStatus; + operationStarted = other286.operationStarted; + operationCompleted = other286.operationCompleted; + hasResultSet = other286.hasResultSet; + progressUpdateResponse = other286.progressUpdateResponse; + numModifiedRows = other286.numModifiedRows; + __isset = other286.__isset; return *this; } void TGetOperationStatusResp::printTo(std::ostream& out) const { @@ -8900,11 +8966,11 @@ void swap(TCancelOperationReq &a, TCancelOperationReq &b) { swap(a.operationHandle, b.operationHandle); } -TCancelOperationReq::TCancelOperationReq(const TCancelOperationReq& other285) { - operationHandle = other285.operationHandle; +TCancelOperationReq::TCancelOperationReq(const TCancelOperationReq& other287) { + operationHandle = other287.operationHandle; } -TCancelOperationReq& TCancelOperationReq::operator=(const TCancelOperationReq& other286) { - operationHandle = other286.operationHandle; +TCancelOperationReq& TCancelOperationReq::operator=(const TCancelOperationReq& other288) { + operationHandle = other288.operationHandle; return *this; } void TCancelOperationReq::printTo(std::ostream& out) const { @@ -8986,11 +9052,11 @@ void swap(TCancelOperationResp &a, TCancelOperationResp &b) { swap(a.status, b.status); } -TCancelOperationResp::TCancelOperationResp(const TCancelOperationResp& other287) { - status = other287.status; +TCancelOperationResp::TCancelOperationResp(const TCancelOperationResp& other289) { + status = other289.status; } -TCancelOperationResp& TCancelOperationResp::operator=(const TCancelOperationResp& other288) { - status = other288.status; +TCancelOperationResp& TCancelOperationResp::operator=(const TCancelOperationResp& other290) { + status = other290.status; return *this; } void TCancelOperationResp::printTo(std::ostream& out) const { @@ -9072,11 +9138,11 @@ void swap(TCloseOperationReq &a, TCloseOperationReq &b) { swap(a.operationHandle, b.operationHandle); } -TCloseOperationReq::TCloseOperationReq(const TCloseOperationReq& other289) { - operationHandle = other289.operationHandle; +TCloseOperationReq::TCloseOperationReq(const TCloseOperationReq& other291) { + operationHandle = other291.operationHandle; } -TCloseOperationReq& TCloseOperationReq::operator=(const TCloseOperationReq& other290) { - operationHandle = other290.operationHandle; +TCloseOperationReq& TCloseOperationReq::operator=(const TCloseOperationReq& other292) { + operationHandle = other292.operationHandle; return *this; } void TCloseOperationReq::printTo(std::ostream& out) const { @@ -9158,11 +9224,11 @@ void swap(TCloseOperationResp &a, TCloseOperationResp &b) { swap(a.status, b.status); } -TCloseOperationResp::TCloseOperationResp(const TCloseOperationResp& other291) { - status = other291.status; +TCloseOperationResp::TCloseOperationResp(const TCloseOperationResp& other293) { + status = other293.status; } -TCloseOperationResp& TCloseOperationResp::operator=(const TCloseOperationResp& other292) { - status = other292.status; +TCloseOperationResp& TCloseOperationResp::operator=(const TCloseOperationResp& other294) { + status = other294.status; return *this; } void TCloseOperationResp::printTo(std::ostream& out) const { @@ -9244,11 +9310,11 @@ void swap(TGetResultSetMetadataReq &a, TGetResultSetMetadataReq &b) { swap(a.operationHandle, b.operationHandle); } -TGetResultSetMetadataReq::TGetResultSetMetadataReq(const TGetResultSetMetadataReq& other293) { - operationHandle = other293.operationHandle; +TGetResultSetMetadataReq::TGetResultSetMetadataReq(const TGetResultSetMetadataReq& other295) { + operationHandle = other295.operationHandle; } -TGetResultSetMetadataReq& TGetResultSetMetadataReq::operator=(const TGetResultSetMetadataReq& other294) { - operationHandle = other294.operationHandle; +TGetResultSetMetadataReq& TGetResultSetMetadataReq::operator=(const TGetResultSetMetadataReq& other296) { + operationHandle = other296.operationHandle; return *this; } void TGetResultSetMetadataReq::printTo(std::ostream& out) const { @@ -9350,15 +9416,15 @@ void swap(TGetResultSetMetadataResp &a, TGetResultSetMetadataResp &b) { swap(a.__isset, b.__isset); } -TGetResultSetMetadataResp::TGetResultSetMetadataResp(const TGetResultSetMetadataResp& other295) { - status = other295.status; - schema = other295.schema; - __isset = other295.__isset; +TGetResultSetMetadataResp::TGetResultSetMetadataResp(const TGetResultSetMetadataResp& other297) { + status = other297.status; + schema = other297.schema; + __isset = other297.__isset; } -TGetResultSetMetadataResp& TGetResultSetMetadataResp::operator=(const TGetResultSetMetadataResp& other296) { - status = other296.status; - schema = other296.schema; - __isset = other296.__isset; +TGetResultSetMetadataResp& TGetResultSetMetadataResp::operator=(const TGetResultSetMetadataResp& other298) { + status = other298.status; + schema = other298.schema; + __isset = other298.__isset; return *this; } void TGetResultSetMetadataResp::printTo(std::ostream& out) const { @@ -9425,9 +9491,9 @@ uint32_t TFetchResultsReq::read(::apache::thrift::protocol::TProtocol* iprot) { break; case 2: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast297; - xfer += iprot->readI32(ecast297); - this->orientation = (TFetchOrientation::type)ecast297; + int32_t ecast299; + xfer += iprot->readI32(ecast299); + this->orientation = (TFetchOrientation::type)ecast299; isset_orientation = true; } else { xfer += iprot->skip(ftype); @@ -9503,19 +9569,19 @@ void swap(TFetchResultsReq &a, TFetchResultsReq &b) { swap(a.__isset, b.__isset); } -TFetchResultsReq::TFetchResultsReq(const TFetchResultsReq& other298) { - operationHandle = other298.operationHandle; - orientation = other298.orientation; - maxRows = other298.maxRows; - fetchType = other298.fetchType; - __isset = other298.__isset; +TFetchResultsReq::TFetchResultsReq(const TFetchResultsReq& other300) { + operationHandle = other300.operationHandle; + orientation = other300.orientation; + maxRows = other300.maxRows; + fetchType = other300.fetchType; + __isset = other300.__isset; } -TFetchResultsReq& TFetchResultsReq::operator=(const TFetchResultsReq& other299) { - operationHandle = other299.operationHandle; - orientation = other299.orientation; - maxRows = other299.maxRows; - fetchType = other299.fetchType; - __isset = other299.__isset; +TFetchResultsReq& TFetchResultsReq::operator=(const TFetchResultsReq& other301) { + operationHandle = other301.operationHandle; + orientation = other301.orientation; + maxRows = other301.maxRows; + fetchType = other301.fetchType; + __isset = other301.__isset; return *this; } void TFetchResultsReq::printTo(std::ostream& out) const { @@ -9639,17 +9705,17 @@ void swap(TFetchResultsResp &a, TFetchResultsResp &b) { swap(a.__isset, b.__isset); } -TFetchResultsResp::TFetchResultsResp(const TFetchResultsResp& other300) { - status = other300.status; - hasMoreRows = other300.hasMoreRows; - results = other300.results; - __isset = other300.__isset; +TFetchResultsResp::TFetchResultsResp(const TFetchResultsResp& other302) { + status = other302.status; + hasMoreRows = other302.hasMoreRows; + results = other302.results; + __isset = other302.__isset; } -TFetchResultsResp& TFetchResultsResp::operator=(const TFetchResultsResp& other301) { - status = other301.status; - hasMoreRows = other301.hasMoreRows; - results = other301.results; - __isset = other301.__isset; +TFetchResultsResp& TFetchResultsResp::operator=(const TFetchResultsResp& other303) { + status = other303.status; + hasMoreRows = other303.hasMoreRows; + results = other303.results; + __isset = other303.__isset; return *this; } void TFetchResultsResp::printTo(std::ostream& out) const { @@ -9773,15 +9839,15 @@ void swap(TGetDelegationTokenReq &a, TGetDelegationTokenReq &b) { swap(a.renewer, b.renewer); } -TGetDelegationTokenReq::TGetDelegationTokenReq(const TGetDelegationTokenReq& other302) { - sessionHandle = other302.sessionHandle; - owner = other302.owner; - renewer = other302.renewer; +TGetDelegationTokenReq::TGetDelegationTokenReq(const TGetDelegationTokenReq& other304) { + sessionHandle = other304.sessionHandle; + owner = other304.owner; + renewer = other304.renewer; } -TGetDelegationTokenReq& TGetDelegationTokenReq::operator=(const TGetDelegationTokenReq& other303) { - sessionHandle = other303.sessionHandle; - owner = other303.owner; - renewer = other303.renewer; +TGetDelegationTokenReq& TGetDelegationTokenReq::operator=(const TGetDelegationTokenReq& other305) { + sessionHandle = other305.sessionHandle; + owner = other305.owner; + renewer = other305.renewer; return *this; } void TGetDelegationTokenReq::printTo(std::ostream& out) const { @@ -9885,15 +9951,15 @@ void swap(TGetDelegationTokenResp &a, TGetDelegationTokenResp &b) { swap(a.__isset, b.__isset); } -TGetDelegationTokenResp::TGetDelegationTokenResp(const TGetDelegationTokenResp& other304) { - status = other304.status; - delegationToken = other304.delegationToken; - __isset = other304.__isset; +TGetDelegationTokenResp::TGetDelegationTokenResp(const TGetDelegationTokenResp& other306) { + status = other306.status; + delegationToken = other306.delegationToken; + __isset = other306.__isset; } -TGetDelegationTokenResp& TGetDelegationTokenResp::operator=(const TGetDelegationTokenResp& other305) { - status = other305.status; - delegationToken = other305.delegationToken; - __isset = other305.__isset; +TGetDelegationTokenResp& TGetDelegationTokenResp::operator=(const TGetDelegationTokenResp& other307) { + status = other307.status; + delegationToken = other307.delegationToken; + __isset = other307.__isset; return *this; } void TGetDelegationTokenResp::printTo(std::ostream& out) const { @@ -9996,13 +10062,13 @@ void swap(TCancelDelegationTokenReq &a, TCancelDelegationTokenReq &b) { swap(a.delegationToken, b.delegationToken); } -TCancelDelegationTokenReq::TCancelDelegationTokenReq(const TCancelDelegationTokenReq& other306) { - sessionHandle = other306.sessionHandle; - delegationToken = other306.delegationToken; +TCancelDelegationTokenReq::TCancelDelegationTokenReq(const TCancelDelegationTokenReq& other308) { + sessionHandle = other308.sessionHandle; + delegationToken = other308.delegationToken; } -TCancelDelegationTokenReq& TCancelDelegationTokenReq::operator=(const TCancelDelegationTokenReq& other307) { - sessionHandle = other307.sessionHandle; - delegationToken = other307.delegationToken; +TCancelDelegationTokenReq& TCancelDelegationTokenReq::operator=(const TCancelDelegationTokenReq& other309) { + sessionHandle = other309.sessionHandle; + delegationToken = other309.delegationToken; return *this; } void TCancelDelegationTokenReq::printTo(std::ostream& out) const { @@ -10085,11 +10151,11 @@ void swap(TCancelDelegationTokenResp &a, TCancelDelegationTokenResp &b) { swap(a.status, b.status); } -TCancelDelegationTokenResp::TCancelDelegationTokenResp(const TCancelDelegationTokenResp& other308) { - status = other308.status; +TCancelDelegationTokenResp::TCancelDelegationTokenResp(const TCancelDelegationTokenResp& other310) { + status = other310.status; } -TCancelDelegationTokenResp& TCancelDelegationTokenResp::operator=(const TCancelDelegationTokenResp& other309) { - status = other309.status; +TCancelDelegationTokenResp& TCancelDelegationTokenResp::operator=(const TCancelDelegationTokenResp& other311) { + status = other311.status; return *this; } void TCancelDelegationTokenResp::printTo(std::ostream& out) const { @@ -10191,13 +10257,13 @@ void swap(TRenewDelegationTokenReq &a, TRenewDelegationTokenReq &b) { swap(a.delegationToken, b.delegationToken); } -TRenewDelegationTokenReq::TRenewDelegationTokenReq(const TRenewDelegationTokenReq& other310) { - sessionHandle = other310.sessionHandle; - delegationToken = other310.delegationToken; +TRenewDelegationTokenReq::TRenewDelegationTokenReq(const TRenewDelegationTokenReq& other312) { + sessionHandle = other312.sessionHandle; + delegationToken = other312.delegationToken; } -TRenewDelegationTokenReq& TRenewDelegationTokenReq::operator=(const TRenewDelegationTokenReq& other311) { - sessionHandle = other311.sessionHandle; - delegationToken = other311.delegationToken; +TRenewDelegationTokenReq& TRenewDelegationTokenReq::operator=(const TRenewDelegationTokenReq& other313) { + sessionHandle = other313.sessionHandle; + delegationToken = other313.delegationToken; return *this; } void TRenewDelegationTokenReq::printTo(std::ostream& out) const { @@ -10280,11 +10346,11 @@ void swap(TRenewDelegationTokenResp &a, TRenewDelegationTokenResp &b) { swap(a.status, b.status); } -TRenewDelegationTokenResp::TRenewDelegationTokenResp(const TRenewDelegationTokenResp& other312) { - status = other312.status; +TRenewDelegationTokenResp::TRenewDelegationTokenResp(const TRenewDelegationTokenResp& other314) { + status = other314.status; } -TRenewDelegationTokenResp& TRenewDelegationTokenResp::operator=(const TRenewDelegationTokenResp& other313) { - status = other313.status; +TRenewDelegationTokenResp& TRenewDelegationTokenResp::operator=(const TRenewDelegationTokenResp& other315) { + status = other315.status; return *this; } void TRenewDelegationTokenResp::printTo(std::ostream& out) const { @@ -10354,14 +10420,14 @@ uint32_t TProgressUpdateResp::read(::apache::thrift::protocol::TProtocol* iprot) if (ftype == ::apache::thrift::protocol::T_LIST) { { this->headerNames.clear(); - uint32_t _size314; - ::apache::thrift::protocol::TType _etype317; - xfer += iprot->readListBegin(_etype317, _size314); - this->headerNames.resize(_size314); - uint32_t _i318; - for (_i318 = 0; _i318 < _size314; ++_i318) + uint32_t _size316; + ::apache::thrift::protocol::TType _etype319; + xfer += iprot->readListBegin(_etype319, _size316); + this->headerNames.resize(_size316); + uint32_t _i320; + for (_i320 = 0; _i320 < _size316; ++_i320) { - xfer += iprot->readString(this->headerNames[_i318]); + xfer += iprot->readString(this->headerNames[_i320]); } xfer += iprot->readListEnd(); } @@ -10374,23 +10440,23 @@ uint32_t TProgressUpdateResp::read(::apache::thrift::protocol::TProtocol* iprot) if (ftype == ::apache::thrift::protocol::T_LIST) { { this->rows.clear(); - uint32_t _size319; - ::apache::thrift::protocol::TType _etype322; - xfer += iprot->readListBegin(_etype322, _size319); - this->rows.resize(_size319); - uint32_t _i323; - for (_i323 = 0; _i323 < _size319; ++_i323) + uint32_t _size321; + ::apache::thrift::protocol::TType _etype324; + xfer += iprot->readListBegin(_etype324, _size321); + this->rows.resize(_size321); + uint32_t _i325; + for (_i325 = 0; _i325 < _size321; ++_i325) { { - this->rows[_i323].clear(); - uint32_t _size324; - ::apache::thrift::protocol::TType _etype327; - xfer += iprot->readListBegin(_etype327, _size324); - this->rows[_i323].resize(_size324); - uint32_t _i328; - for (_i328 = 0; _i328 < _size324; ++_i328) + this->rows[_i325].clear(); + uint32_t _size326; + ::apache::thrift::protocol::TType _etype329; + xfer += iprot->readListBegin(_etype329, _size326); + this->rows[_i325].resize(_size326); + uint32_t _i330; + for (_i330 = 0; _i330 < _size326; ++_i330) { - xfer += iprot->readString(this->rows[_i323][_i328]); + xfer += iprot->readString(this->rows[_i325][_i330]); } xfer += iprot->readListEnd(); } @@ -10412,9 +10478,9 @@ uint32_t TProgressUpdateResp::read(::apache::thrift::protocol::TProtocol* iprot) break; case 4: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast329; - xfer += iprot->readI32(ecast329); - this->status = (TJobExecutionStatus::type)ecast329; + int32_t ecast331; + xfer += iprot->readI32(ecast331); + this->status = (TJobExecutionStatus::type)ecast331; isset_status = true; } else { xfer += iprot->skip(ftype); @@ -10468,10 +10534,10 @@ uint32_t TProgressUpdateResp::write(::apache::thrift::protocol::TProtocol* oprot xfer += oprot->writeFieldBegin("headerNames", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->headerNames.size())); - std::vector ::const_iterator _iter330; - for (_iter330 = this->headerNames.begin(); _iter330 != this->headerNames.end(); ++_iter330) + std::vector ::const_iterator _iter332; + for (_iter332 = this->headerNames.begin(); _iter332 != this->headerNames.end(); ++_iter332) { - xfer += oprot->writeString((*_iter330)); + xfer += oprot->writeString((*_iter332)); } xfer += oprot->writeListEnd(); } @@ -10480,15 +10546,15 @@ uint32_t TProgressUpdateResp::write(::apache::thrift::protocol::TProtocol* oprot xfer += oprot->writeFieldBegin("rows", ::apache::thrift::protocol::T_LIST, 2); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_LIST, static_cast(this->rows.size())); - std::vector > ::const_iterator _iter331; - for (_iter331 = this->rows.begin(); _iter331 != this->rows.end(); ++_iter331) + std::vector > ::const_iterator _iter333; + for (_iter333 = this->rows.begin(); _iter333 != this->rows.end(); ++_iter333) { { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*_iter331).size())); - std::vector ::const_iterator _iter332; - for (_iter332 = (*_iter331).begin(); _iter332 != (*_iter331).end(); ++_iter332) + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*_iter333).size())); + std::vector ::const_iterator _iter334; + for (_iter334 = (*_iter333).begin(); _iter334 != (*_iter333).end(); ++_iter334) { - xfer += oprot->writeString((*_iter332)); + xfer += oprot->writeString((*_iter334)); } xfer += oprot->writeListEnd(); } @@ -10528,21 +10594,21 @@ void swap(TProgressUpdateResp &a, TProgressUpdateResp &b) { swap(a.startTime, b.startTime); } -TProgressUpdateResp::TProgressUpdateResp(const TProgressUpdateResp& other333) { - headerNames = other333.headerNames; - rows = other333.rows; - progressedPercentage = other333.progressedPercentage; - status = other333.status; - footerSummary = other333.footerSummary; - startTime = other333.startTime; -} -TProgressUpdateResp& TProgressUpdateResp::operator=(const TProgressUpdateResp& other334) { - headerNames = other334.headerNames; - rows = other334.rows; - progressedPercentage = other334.progressedPercentage; - status = other334.status; - footerSummary = other334.footerSummary; - startTime = other334.startTime; +TProgressUpdateResp::TProgressUpdateResp(const TProgressUpdateResp& other335) { + headerNames = other335.headerNames; + rows = other335.rows; + progressedPercentage = other335.progressedPercentage; + status = other335.status; + footerSummary = other335.footerSummary; + startTime = other335.startTime; +} +TProgressUpdateResp& TProgressUpdateResp::operator=(const TProgressUpdateResp& other336) { + headerNames = other336.headerNames; + rows = other336.rows; + progressedPercentage = other336.progressedPercentage; + status = other336.status; + footerSummary = other336.footerSummary; + startTime = other336.startTime; return *this; } void TProgressUpdateResp::printTo(std::ostream& out) const { @@ -10629,11 +10695,11 @@ void swap(TGetQueryIdReq &a, TGetQueryIdReq &b) { swap(a.operationHandle, b.operationHandle); } -TGetQueryIdReq::TGetQueryIdReq(const TGetQueryIdReq& other335) { - operationHandle = other335.operationHandle; +TGetQueryIdReq::TGetQueryIdReq(const TGetQueryIdReq& other337) { + operationHandle = other337.operationHandle; } -TGetQueryIdReq& TGetQueryIdReq::operator=(const TGetQueryIdReq& other336) { - operationHandle = other336.operationHandle; +TGetQueryIdReq& TGetQueryIdReq::operator=(const TGetQueryIdReq& other338) { + operationHandle = other338.operationHandle; return *this; } void TGetQueryIdReq::printTo(std::ostream& out) const { @@ -10715,11 +10781,11 @@ void swap(TGetQueryIdResp &a, TGetQueryIdResp &b) { swap(a.queryId, b.queryId); } -TGetQueryIdResp::TGetQueryIdResp(const TGetQueryIdResp& other337) { - queryId = other337.queryId; +TGetQueryIdResp::TGetQueryIdResp(const TGetQueryIdResp& other339) { + queryId = other339.queryId; } -TGetQueryIdResp& TGetQueryIdResp::operator=(const TGetQueryIdResp& other338) { - queryId = other338.queryId; +TGetQueryIdResp& TGetQueryIdResp::operator=(const TGetQueryIdResp& other340) { + queryId = other340.queryId; return *this; } void TGetQueryIdResp::printTo(std::ostream& out) const { diff --git service-rpc/src/gen/thrift/gen-cpp/TCLIService_types.h service-rpc/src/gen/thrift/gen-cpp/TCLIService_types.h index b30c28ffab..b30097dd00 100644 --- service-rpc/src/gen/thrift/gen-cpp/TCLIService_types.h +++ service-rpc/src/gen/thrift/gen-cpp/TCLIService_types.h @@ -269,6 +269,8 @@ class TOperationHandle; class TOpenSessionReq; +class TAuthenticateReq; + class TOpenSessionResp; class TSetClientInfoReq; @@ -2142,9 +2144,7 @@ inline std::ostream& operator<<(std::ostream& out, const TOperationHandle& obj) } typedef struct _TOpenSessionReq__isset { - _TOpenSessionReq__isset() : username(false), password(false), configuration(false) {} - bool username :1; - bool password :1; + _TOpenSessionReq__isset() : configuration(false) {} bool configuration :1; } _TOpenSessionReq__isset; @@ -2153,39 +2153,25 @@ class TOpenSessionReq { TOpenSessionReq(const TOpenSessionReq&); TOpenSessionReq& operator=(const TOpenSessionReq&); - TOpenSessionReq() : client_protocol((TProtocolVersion::type)9), username(), password() { + TOpenSessionReq() : client_protocol((TProtocolVersion::type)9) { client_protocol = (TProtocolVersion::type)9; } virtual ~TOpenSessionReq() throw(); TProtocolVersion::type client_protocol; - std::string username; - std::string password; std::map configuration; _TOpenSessionReq__isset __isset; void __set_client_protocol(const TProtocolVersion::type val); - void __set_username(const std::string& val); - - void __set_password(const std::string& val); - void __set_configuration(const std::map & val); bool operator == (const TOpenSessionReq & rhs) const { if (!(client_protocol == rhs.client_protocol)) return false; - if (__isset.username != rhs.__isset.username) - return false; - else if (__isset.username && !(username == rhs.username)) - return false; - if (__isset.password != rhs.__isset.password) - return false; - else if (__isset.password && !(password == rhs.password)) - return false; if (__isset.configuration != rhs.__isset.configuration) return false; else if (__isset.configuration && !(configuration == rhs.configuration)) @@ -2212,6 +2198,62 @@ inline std::ostream& operator<<(std::ostream& out, const TOpenSessionReq& obj) return out; } +typedef struct _TAuthenticateReq__isset { + _TAuthenticateReq__isset() : username(false), password(false) {} + bool username :1; + bool password :1; +} _TAuthenticateReq__isset; + +class TAuthenticateReq { + public: + + TAuthenticateReq(const TAuthenticateReq&); + TAuthenticateReq& operator=(const TAuthenticateReq&); + TAuthenticateReq() : username(), password() { + } + + virtual ~TAuthenticateReq() throw(); + std::string username; + std::string password; + + _TAuthenticateReq__isset __isset; + + void __set_username(const std::string& val); + + void __set_password(const std::string& val); + + bool operator == (const TAuthenticateReq & rhs) const + { + if (__isset.username != rhs.__isset.username) + return false; + else if (__isset.username && !(username == rhs.username)) + return false; + if (__isset.password != rhs.__isset.password) + return false; + else if (__isset.password && !(password == rhs.password)) + return false; + return true; + } + bool operator != (const TAuthenticateReq &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TAuthenticateReq & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(TAuthenticateReq &a, TAuthenticateReq &b); + +inline std::ostream& operator<<(std::ostream& out, const TAuthenticateReq& obj) +{ + obj.printTo(out); + return out; +} + typedef struct _TOpenSessionResp__isset { _TOpenSessionResp__isset() : sessionHandle(false), configuration(false) {} bool sessionHandle :1; diff --git service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TAuthenticateReq.java service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TAuthenticateReq.java new file mode 100644 index 0000000000..0fc0b38f31 --- /dev/null +++ service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TAuthenticateReq.java @@ -0,0 +1,499 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hive.service.rpc.thrift; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +@org.apache.hadoop.hive.common.classification.InterfaceAudience.Public @org.apache.hadoop.hive.common.classification.InterfaceStability.Stable public class TAuthenticateReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TAuthenticateReq"); + + private static final org.apache.thrift.protocol.TField USERNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("username", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField PASSWORD_FIELD_DESC = new org.apache.thrift.protocol.TField("password", org.apache.thrift.protocol.TType.STRING, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new TAuthenticateReqStandardSchemeFactory()); + schemes.put(TupleScheme.class, new TAuthenticateReqTupleSchemeFactory()); + } + + private String username; // optional + private String password; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + USERNAME((short)1, "username"), + PASSWORD((short)2, "password"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // USERNAME + return USERNAME; + case 2: // PASSWORD + return PASSWORD; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final _Fields optionals[] = {_Fields.USERNAME,_Fields.PASSWORD}; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.USERNAME, new org.apache.thrift.meta_data.FieldMetaData("username", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PASSWORD, new org.apache.thrift.meta_data.FieldMetaData("password", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TAuthenticateReq.class, metaDataMap); + } + + public TAuthenticateReq() { + } + + /** + * Performs a deep copy on other. + */ + public TAuthenticateReq(TAuthenticateReq other) { + if (other.isSetUsername()) { + this.username = other.username; + } + if (other.isSetPassword()) { + this.password = other.password; + } + } + + public TAuthenticateReq deepCopy() { + return new TAuthenticateReq(this); + } + + @Override + public void clear() { + this.username = null; + this.password = null; + } + + public String getUsername() { + return this.username; + } + + public void setUsername(String username) { + this.username = username; + } + + public void unsetUsername() { + this.username = null; + } + + /** Returns true if field username is set (has been assigned a value) and false otherwise */ + public boolean isSetUsername() { + return this.username != null; + } + + public void setUsernameIsSet(boolean value) { + if (!value) { + this.username = null; + } + } + + public String getPassword() { + return this.password; + } + + public void setPassword(String password) { + this.password = password; + } + + public void unsetPassword() { + this.password = null; + } + + /** Returns true if field password is set (has been assigned a value) and false otherwise */ + public boolean isSetPassword() { + return this.password != null; + } + + public void setPasswordIsSet(boolean value) { + if (!value) { + this.password = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case USERNAME: + if (value == null) { + unsetUsername(); + } else { + setUsername((String)value); + } + break; + + case PASSWORD: + if (value == null) { + unsetPassword(); + } else { + setPassword((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case USERNAME: + return getUsername(); + + case PASSWORD: + return getPassword(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case USERNAME: + return isSetUsername(); + case PASSWORD: + return isSetPassword(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof TAuthenticateReq) + return this.equals((TAuthenticateReq)that); + return false; + } + + public boolean equals(TAuthenticateReq that) { + if (that == null) + return false; + + boolean this_present_username = true && this.isSetUsername(); + boolean that_present_username = true && that.isSetUsername(); + if (this_present_username || that_present_username) { + if (!(this_present_username && that_present_username)) + return false; + if (!this.username.equals(that.username)) + return false; + } + + boolean this_present_password = true && this.isSetPassword(); + boolean that_present_password = true && that.isSetPassword(); + if (this_present_password || that_present_password) { + if (!(this_present_password && that_present_password)) + return false; + if (!this.password.equals(that.password)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_username = true && (isSetUsername()); + list.add(present_username); + if (present_username) + list.add(username); + + boolean present_password = true && (isSetPassword()); + list.add(present_password); + if (present_password) + list.add(password); + + return list.hashCode(); + } + + @Override + public int compareTo(TAuthenticateReq other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUsername()).compareTo(other.isSetUsername()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUsername()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.username, other.username); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPassword()).compareTo(other.isSetPassword()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPassword()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.password, other.password); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("TAuthenticateReq("); + boolean first = true; + + if (isSetUsername()) { + sb.append("username:"); + if (this.username == null) { + sb.append("null"); + } else { + sb.append(this.username); + } + first = false; + } + if (isSetPassword()) { + if (!first) sb.append(", "); + sb.append("password:"); + if (this.password == null) { + sb.append("null"); + } else { + sb.append(this.password); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class TAuthenticateReqStandardSchemeFactory implements SchemeFactory { + public TAuthenticateReqStandardScheme getScheme() { + return new TAuthenticateReqStandardScheme(); + } + } + + private static class TAuthenticateReqStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, TAuthenticateReq 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: // USERNAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.username = iprot.readString(); + struct.setUsernameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // PASSWORD + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.password = iprot.readString(); + struct.setPasswordIsSet(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(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, TAuthenticateReq struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.username != null) { + if (struct.isSetUsername()) { + oprot.writeFieldBegin(USERNAME_FIELD_DESC); + oprot.writeString(struct.username); + oprot.writeFieldEnd(); + } + } + if (struct.password != null) { + if (struct.isSetPassword()) { + oprot.writeFieldBegin(PASSWORD_FIELD_DESC); + oprot.writeString(struct.password); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TAuthenticateReqTupleSchemeFactory implements SchemeFactory { + public TAuthenticateReqTupleScheme getScheme() { + return new TAuthenticateReqTupleScheme(); + } + } + + private static class TAuthenticateReqTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TAuthenticateReq struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUsername()) { + optionals.set(0); + } + if (struct.isSetPassword()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetUsername()) { + oprot.writeString(struct.username); + } + if (struct.isSetPassword()) { + oprot.writeString(struct.password); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TAuthenticateReq struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.username = iprot.readString(); + struct.setUsernameIsSet(true); + } + if (incoming.get(1)) { + struct.password = iprot.readString(); + struct.setPasswordIsSet(true); + } + } + } + +} + diff --git service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCLIService.java service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCLIService.java index 83bd6b14dc..d56c9e23b8 100644 --- service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCLIService.java +++ service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCLIService.java @@ -39,7 +39,7 @@ @org.apache.hadoop.hive.common.classification.InterfaceAudience.Public @org.apache.hadoop.hive.common.classification.InterfaceStability.Stable public interface Iface { - public TOpenSessionResp OpenSession(TOpenSessionReq req) throws org.apache.thrift.TException; + public TOpenSessionResp OpenSession(TOpenSessionReq req, TAuthenticateReq tAuthenticateReq) throws org.apache.thrift.TException; public TCloseSessionResp CloseSession(TCloseSessionReq req) throws org.apache.thrift.TException; @@ -89,7 +89,7 @@ @org.apache.hadoop.hive.common.classification.InterfaceAudience.Public @org.apache.hadoop.hive.common.classification.InterfaceStability.Stable public interface AsyncIface { - public void OpenSession(TOpenSessionReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void OpenSession(TOpenSessionReq req, TAuthenticateReq tAuthenticateReq, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void CloseSession(TCloseSessionReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; @@ -157,16 +157,17 @@ public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.prot super(iprot, oprot); } - public TOpenSessionResp OpenSession(TOpenSessionReq req) throws org.apache.thrift.TException + public TOpenSessionResp OpenSession(TOpenSessionReq req, TAuthenticateReq tAuthenticateReq) throws org.apache.thrift.TException { - send_OpenSession(req); + send_OpenSession(req, tAuthenticateReq); return recv_OpenSession(); } - public void send_OpenSession(TOpenSessionReq req) throws org.apache.thrift.TException + public void send_OpenSession(TOpenSessionReq req, TAuthenticateReq tAuthenticateReq) throws org.apache.thrift.TException { OpenSession_args args = new OpenSession_args(); args.setReq(req); + args.setTAuthenticateReq(tAuthenticateReq); sendBase("OpenSession", args); } @@ -704,24 +705,27 @@ public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, super(protocolFactory, clientManager, transport); } - public void OpenSession(TOpenSessionReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void OpenSession(TOpenSessionReq req, TAuthenticateReq tAuthenticateReq, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - OpenSession_call method_call = new OpenSession_call(req, resultHandler, this, ___protocolFactory, ___transport); + OpenSession_call method_call = new OpenSession_call(req, tAuthenticateReq, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } @org.apache.hadoop.hive.common.classification.InterfaceAudience.Public @org.apache.hadoop.hive.common.classification.InterfaceStability.Stable public static class OpenSession_call extends org.apache.thrift.async.TAsyncMethodCall { private TOpenSessionReq req; - public OpenSession_call(TOpenSessionReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + private TAuthenticateReq tAuthenticateReq; + public OpenSession_call(TOpenSessionReq req, TAuthenticateReq tAuthenticateReq, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.req = req; + this.tAuthenticateReq = tAuthenticateReq; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("OpenSession", org.apache.thrift.protocol.TMessageType.CALL, 0)); OpenSession_args args = new OpenSession_args(); args.setReq(req); + args.setTAuthenticateReq(tAuthenticateReq); args.write(prot); prot.writeMessageEnd(); } @@ -1494,7 +1498,7 @@ protected boolean isOneway() { 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); + result.success = iface.OpenSession(args.req, args.tAuthenticateReq); return result; } } @@ -2025,7 +2029,7 @@ protected boolean isOneway() { } public void start(I iface, OpenSession_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.OpenSession(args.req,resultHandler); + iface.OpenSession(args.req, args.tAuthenticateReq,resultHandler); } } @@ -3157,6 +3161,7 @@ public void start(I iface, SetClientInfo_args args, org.apache.thrift.async.Asyn private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("OpenSession_args"); private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField T_AUTHENTICATE_REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("tAuthenticateReq", org.apache.thrift.protocol.TType.STRUCT, (short)-1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -3165,10 +3170,12 @@ public void start(I iface, SetClientInfo_args args, org.apache.thrift.async.Asyn } private TOpenSessionReq req; // required + private TAuthenticateReq tAuthenticateReq; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - REQ((short)1, "req"); + REQ((short)1, "req"), + T_AUTHENTICATE_REQ((short)-1, "tAuthenticateReq"); private static final Map byName = new HashMap(); @@ -3185,6 +3192,8 @@ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // REQ return REQ; + case -1: // T_AUTHENTICATE_REQ + return T_AUTHENTICATE_REQ; default: return null; } @@ -3230,6 +3239,8 @@ public String getFieldName() { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TOpenSessionReq.class))); + tmpMap.put(_Fields.T_AUTHENTICATE_REQ, new org.apache.thrift.meta_data.FieldMetaData("tAuthenticateReq", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthenticateReq.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(OpenSession_args.class, metaDataMap); } @@ -3238,10 +3249,12 @@ public OpenSession_args() { } public OpenSession_args( - TOpenSessionReq req) + TOpenSessionReq req, + TAuthenticateReq tAuthenticateReq) { this(); this.req = req; + this.tAuthenticateReq = tAuthenticateReq; } /** @@ -3251,6 +3264,9 @@ public OpenSession_args(OpenSession_args other) { if (other.isSetReq()) { this.req = new TOpenSessionReq(other.req); } + if (other.isSetTAuthenticateReq()) { + this.tAuthenticateReq = new TAuthenticateReq(other.tAuthenticateReq); + } } public OpenSession_args deepCopy() { @@ -3260,6 +3276,7 @@ public OpenSession_args deepCopy() { @Override public void clear() { this.req = null; + this.tAuthenticateReq = null; } public TOpenSessionReq getReq() { @@ -3285,6 +3302,29 @@ public void setReqIsSet(boolean value) { } } + public TAuthenticateReq getTAuthenticateReq() { + return this.tAuthenticateReq; + } + + public void setTAuthenticateReq(TAuthenticateReq tAuthenticateReq) { + this.tAuthenticateReq = tAuthenticateReq; + } + + public void unsetTAuthenticateReq() { + this.tAuthenticateReq = null; + } + + /** Returns true if field tAuthenticateReq is set (has been assigned a value) and false otherwise */ + public boolean isSetTAuthenticateReq() { + return this.tAuthenticateReq != null; + } + + public void setTAuthenticateReqIsSet(boolean value) { + if (!value) { + this.tAuthenticateReq = null; + } + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case REQ: @@ -3295,6 +3335,14 @@ public void setFieldValue(_Fields field, Object value) { } break; + case T_AUTHENTICATE_REQ: + if (value == null) { + unsetTAuthenticateReq(); + } else { + setTAuthenticateReq((TAuthenticateReq)value); + } + break; + } } @@ -3303,6 +3351,9 @@ public Object getFieldValue(_Fields field) { case REQ: return getReq(); + case T_AUTHENTICATE_REQ: + return getTAuthenticateReq(); + } throw new IllegalStateException(); } @@ -3316,6 +3367,8 @@ public boolean isSet(_Fields field) { switch (field) { case REQ: return isSetReq(); + case T_AUTHENTICATE_REQ: + return isSetTAuthenticateReq(); } throw new IllegalStateException(); } @@ -3342,6 +3395,15 @@ public boolean equals(OpenSession_args that) { return false; } + boolean this_present_tAuthenticateReq = true && this.isSetTAuthenticateReq(); + boolean that_present_tAuthenticateReq = true && that.isSetTAuthenticateReq(); + if (this_present_tAuthenticateReq || that_present_tAuthenticateReq) { + if (!(this_present_tAuthenticateReq && that_present_tAuthenticateReq)) + return false; + if (!this.tAuthenticateReq.equals(that.tAuthenticateReq)) + return false; + } + return true; } @@ -3354,6 +3416,11 @@ public int hashCode() { if (present_req) list.add(req); + boolean present_tAuthenticateReq = true && (isSetTAuthenticateReq()); + list.add(present_tAuthenticateReq); + if (present_tAuthenticateReq) + list.add(tAuthenticateReq); + return list.hashCode(); } @@ -3375,6 +3442,16 @@ public int compareTo(OpenSession_args other) { return lastComparison; } } + lastComparison = Boolean.valueOf(isSetTAuthenticateReq()).compareTo(other.isSetTAuthenticateReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTAuthenticateReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tAuthenticateReq, other.tAuthenticateReq); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -3402,6 +3479,14 @@ public String toString() { sb.append(this.req); } first = false; + if (!first) sb.append(", "); + sb.append("tAuthenticateReq:"); + if (this.tAuthenticateReq == null) { + sb.append("null"); + } else { + sb.append(this.tAuthenticateReq); + } + first = false; sb.append(")"); return sb.toString(); } @@ -3412,6 +3497,9 @@ public void validate() throws org.apache.thrift.TException { if (req != null) { req.validate(); } + if (tAuthenticateReq != null) { + tAuthenticateReq.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -3457,6 +3545,15 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, OpenSession_args st org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case -1: // T_AUTHENTICATE_REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.tAuthenticateReq = new TAuthenticateReq(); + struct.tAuthenticateReq.read(iprot); + struct.setTAuthenticateReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -3470,6 +3567,11 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, OpenSession_args s struct.validate(); oprot.writeStructBegin(STRUCT_DESC); + if (struct.tAuthenticateReq != null) { + oprot.writeFieldBegin(T_AUTHENTICATE_REQ_FIELD_DESC); + struct.tAuthenticateReq.write(oprot); + oprot.writeFieldEnd(); + } if (struct.req != null) { oprot.writeFieldBegin(REQ_FIELD_DESC); struct.req.write(oprot); @@ -3496,21 +3598,32 @@ public void write(org.apache.thrift.protocol.TProtocol prot, OpenSession_args st if (struct.isSetReq()) { optionals.set(0); } - oprot.writeBitSet(optionals, 1); + if (struct.isSetTAuthenticateReq()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); if (struct.isSetReq()) { struct.req.write(oprot); } + if (struct.isSetTAuthenticateReq()) { + struct.tAuthenticateReq.write(oprot); + } } @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); + BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.req = new TOpenSessionReq(); struct.req.read(iprot); struct.setReqIsSet(true); } + if (incoming.get(1)) { + struct.tAuthenticateReq = new TAuthenticateReq(); + struct.tAuthenticateReq.read(iprot); + struct.setTAuthenticateReqIsSet(true); + } } } diff --git service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TOpenSessionReq.java service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TOpenSessionReq.java index 3195e704f3..4aa1bb62ae 100644 --- service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TOpenSessionReq.java +++ service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TOpenSessionReq.java @@ -39,9 +39,7 @@ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TOpenSessionReq"); private static final org.apache.thrift.protocol.TField CLIENT_PROTOCOL_FIELD_DESC = new org.apache.thrift.protocol.TField("client_protocol", org.apache.thrift.protocol.TType.I32, (short)1); - private static final org.apache.thrift.protocol.TField USERNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("username", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField PASSWORD_FIELD_DESC = new org.apache.thrift.protocol.TField("password", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField CONFIGURATION_FIELD_DESC = new org.apache.thrift.protocol.TField("configuration", org.apache.thrift.protocol.TType.MAP, (short)4); + private static final org.apache.thrift.protocol.TField CONFIGURATION_FIELD_DESC = new org.apache.thrift.protocol.TField("configuration", org.apache.thrift.protocol.TType.MAP, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -50,8 +48,6 @@ } private TProtocolVersion client_protocol; // required - private String username; // optional - private String password; // optional private Map configuration; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -61,9 +57,7 @@ * @see TProtocolVersion */ CLIENT_PROTOCOL((short)1, "client_protocol"), - USERNAME((short)2, "username"), - PASSWORD((short)3, "password"), - CONFIGURATION((short)4, "configuration"); + CONFIGURATION((short)2, "configuration"); private static final Map byName = new HashMap(); @@ -80,11 +74,7 @@ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // CLIENT_PROTOCOL return CLIENT_PROTOCOL; - case 2: // USERNAME - return USERNAME; - case 3: // PASSWORD - return PASSWORD; - case 4: // CONFIGURATION + case 2: // CONFIGURATION return CONFIGURATION; default: return null; @@ -126,16 +116,12 @@ public String getFieldName() { } // isset id assignments - private static final _Fields optionals[] = {_Fields.USERNAME,_Fields.PASSWORD,_Fields.CONFIGURATION}; + private static final _Fields optionals[] = {_Fields.CONFIGURATION}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.CLIENT_PROTOCOL, new org.apache.thrift.meta_data.FieldMetaData("client_protocol", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TProtocolVersion.class))); - tmpMap.put(_Fields.USERNAME, new org.apache.thrift.meta_data.FieldMetaData("username", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PASSWORD, new org.apache.thrift.meta_data.FieldMetaData("password", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.CONFIGURATION, new org.apache.thrift.meta_data.FieldMetaData("configuration", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), @@ -163,12 +149,6 @@ public TOpenSessionReq(TOpenSessionReq other) { if (other.isSetClient_protocol()) { this.client_protocol = other.client_protocol; } - if (other.isSetUsername()) { - this.username = other.username; - } - if (other.isSetPassword()) { - this.password = other.password; - } if (other.isSetConfiguration()) { Map __this__configuration = new HashMap(other.configuration); this.configuration = __this__configuration; @@ -183,8 +163,6 @@ public TOpenSessionReq deepCopy() { public void clear() { this.client_protocol = org.apache.hive.service.rpc.thrift.TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V10; - this.username = null; - this.password = null; this.configuration = null; } @@ -219,52 +197,6 @@ public void setClient_protocolIsSet(boolean value) { } } - public String getUsername() { - return this.username; - } - - public void setUsername(String username) { - this.username = username; - } - - public void unsetUsername() { - this.username = null; - } - - /** Returns true if field username is set (has been assigned a value) and false otherwise */ - public boolean isSetUsername() { - return this.username != null; - } - - public void setUsernameIsSet(boolean value) { - if (!value) { - this.username = null; - } - } - - public String getPassword() { - return this.password; - } - - public void setPassword(String password) { - this.password = password; - } - - public void unsetPassword() { - this.password = null; - } - - /** Returns true if field password is set (has been assigned a value) and false otherwise */ - public boolean isSetPassword() { - return this.password != null; - } - - public void setPasswordIsSet(boolean value) { - if (!value) { - this.password = null; - } - } - public int getConfigurationSize() { return (this.configuration == null) ? 0 : this.configuration.size(); } @@ -309,22 +241,6 @@ public void setFieldValue(_Fields field, Object value) { } break; - case USERNAME: - if (value == null) { - unsetUsername(); - } else { - setUsername((String)value); - } - break; - - case PASSWORD: - if (value == null) { - unsetPassword(); - } else { - setPassword((String)value); - } - break; - case CONFIGURATION: if (value == null) { unsetConfiguration(); @@ -341,12 +257,6 @@ public Object getFieldValue(_Fields field) { case CLIENT_PROTOCOL: return getClient_protocol(); - case USERNAME: - return getUsername(); - - case PASSWORD: - return getPassword(); - case CONFIGURATION: return getConfiguration(); @@ -363,10 +273,6 @@ public boolean isSet(_Fields field) { switch (field) { case CLIENT_PROTOCOL: return isSetClient_protocol(); - case USERNAME: - return isSetUsername(); - case PASSWORD: - return isSetPassword(); case CONFIGURATION: return isSetConfiguration(); } @@ -395,24 +301,6 @@ public boolean equals(TOpenSessionReq that) { return false; } - boolean this_present_username = true && this.isSetUsername(); - boolean that_present_username = true && that.isSetUsername(); - if (this_present_username || that_present_username) { - if (!(this_present_username && that_present_username)) - return false; - if (!this.username.equals(that.username)) - return false; - } - - boolean this_present_password = true && this.isSetPassword(); - boolean that_present_password = true && that.isSetPassword(); - if (this_present_password || that_present_password) { - if (!(this_present_password && that_present_password)) - return false; - if (!this.password.equals(that.password)) - return false; - } - boolean this_present_configuration = true && this.isSetConfiguration(); boolean that_present_configuration = true && that.isSetConfiguration(); if (this_present_configuration || that_present_configuration) { @@ -434,16 +322,6 @@ public int hashCode() { if (present_client_protocol) list.add(client_protocol.getValue()); - boolean present_username = true && (isSetUsername()); - list.add(present_username); - if (present_username) - list.add(username); - - boolean present_password = true && (isSetPassword()); - list.add(present_password); - if (present_password) - list.add(password); - boolean present_configuration = true && (isSetConfiguration()); list.add(present_configuration); if (present_configuration) @@ -470,26 +348,6 @@ public int compareTo(TOpenSessionReq other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetUsername()).compareTo(other.isSetUsername()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetUsername()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.username, other.username); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPassword()).compareTo(other.isSetPassword()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPassword()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.password, other.password); - if (lastComparison != 0) { - return lastComparison; - } - } lastComparison = Boolean.valueOf(isSetConfiguration()).compareTo(other.isSetConfiguration()); if (lastComparison != 0) { return lastComparison; @@ -527,26 +385,6 @@ public String toString() { sb.append(this.client_protocol); } first = false; - if (isSetUsername()) { - if (!first) sb.append(", "); - sb.append("username:"); - if (this.username == null) { - sb.append("null"); - } else { - sb.append(this.username); - } - first = false; - } - if (isSetPassword()) { - if (!first) sb.append(", "); - sb.append("password:"); - if (this.password == null) { - sb.append("null"); - } else { - sb.append(this.password); - } - first = false; - } if (isSetConfiguration()) { if (!first) sb.append(", "); sb.append("configuration:"); @@ -612,23 +450,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TOpenSessionReq str org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 2: // USERNAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.username = iprot.readString(); - struct.setUsernameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // PASSWORD - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.password = iprot.readString(); - struct.setPasswordIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // CONFIGURATION + case 2: // CONFIGURATION if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map142 = iprot.readMapBegin(); @@ -666,20 +488,6 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TOpenSessionReq st oprot.writeI32(struct.client_protocol.getValue()); oprot.writeFieldEnd(); } - if (struct.username != null) { - if (struct.isSetUsername()) { - oprot.writeFieldBegin(USERNAME_FIELD_DESC); - oprot.writeString(struct.username); - oprot.writeFieldEnd(); - } - } - if (struct.password != null) { - if (struct.isSetPassword()) { - oprot.writeFieldBegin(PASSWORD_FIELD_DESC); - oprot.writeString(struct.password); - oprot.writeFieldEnd(); - } - } if (struct.configuration != null) { if (struct.isSetConfiguration()) { oprot.writeFieldBegin(CONFIGURATION_FIELD_DESC); @@ -714,22 +522,10 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TOpenSessionReq str TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeI32(struct.client_protocol.getValue()); BitSet optionals = new BitSet(); - if (struct.isSetUsername()) { - optionals.set(0); - } - if (struct.isSetPassword()) { - optionals.set(1); - } if (struct.isSetConfiguration()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetUsername()) { - oprot.writeString(struct.username); - } - if (struct.isSetPassword()) { - oprot.writeString(struct.password); + optionals.set(0); } + oprot.writeBitSet(optionals, 1); if (struct.isSetConfiguration()) { { oprot.writeI32(struct.configuration.size()); @@ -747,16 +543,8 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TOpenSessionReq stru TTupleProtocol iprot = (TTupleProtocol) prot; struct.client_protocol = org.apache.hive.service.rpc.thrift.TProtocolVersion.findByValue(iprot.readI32()); struct.setClient_protocolIsSet(true); - BitSet incoming = iprot.readBitSet(3); + BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.username = iprot.readString(); - struct.setUsernameIsSet(true); - } - if (incoming.get(1)) { - struct.password = iprot.readString(); - struct.setPasswordIsSet(true); - } - if (incoming.get(2)) { { org.apache.thrift.protocol.TMap _map148 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.configuration = new HashMap(2*_map148.size); diff --git service-rpc/src/gen/thrift/gen-php/TCLIService.php service-rpc/src/gen/thrift/gen-php/TCLIService.php index 313d79d303..e14b01cf78 100644 --- service-rpc/src/gen/thrift/gen-php/TCLIService.php +++ service-rpc/src/gen/thrift/gen-php/TCLIService.php @@ -18,9 +18,10 @@ use Thrift\Exception\TApplicationException; interface TCLIServiceIf { /** * @param \TOpenSessionReq $req + * @param \TAuthenticateReq $tAuthenticateReq * @return \TOpenSessionResp */ - public function OpenSession(\TOpenSessionReq $req); + public function OpenSession(\TOpenSessionReq $req, \TAuthenticateReq $tAuthenticateReq); /** * @param \TCloseSessionReq $req * @return \TCloseSessionResp @@ -144,16 +145,17 @@ class TCLIServiceClient implements \TCLIServiceIf { $this->output_ = $output ? $output : $input; } - public function OpenSession(\TOpenSessionReq $req) + public function OpenSession(\TOpenSessionReq $req, \TAuthenticateReq $tAuthenticateReq) { - $this->send_OpenSession($req); + $this->send_OpenSession($req, $tAuthenticateReq); return $this->recv_OpenSession(); } - public function send_OpenSession(\TOpenSessionReq $req) + public function send_OpenSession(\TOpenSessionReq $req, \TAuthenticateReq $tAuthenticateReq) { $args = new \TCLIService_OpenSession_args(); $args->req = $req; + $args->tAuthenticateReq = $tAuthenticateReq; $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); if ($bin_accel) { @@ -1328,6 +1330,10 @@ class TCLIService_OpenSession_args { * @var \TOpenSessionReq */ public $req = null; + /** + * @var \TAuthenticateReq + */ + public $tAuthenticateReq = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -1337,12 +1343,20 @@ class TCLIService_OpenSession_args { 'type' => TType::STRUCT, 'class' => '\TOpenSessionReq', ), + -1 => array( + 'var' => 'tAuthenticateReq', + 'type' => TType::STRUCT, + 'class' => '\TAuthenticateReq', + ), ); } if (is_array($vals)) { if (isset($vals['req'])) { $this->req = $vals['req']; } + if (isset($vals['tAuthenticateReq'])) { + $this->tAuthenticateReq = $vals['tAuthenticateReq']; + } } } @@ -1373,6 +1387,14 @@ class TCLIService_OpenSession_args { $xfer += $input->skip($ftype); } break; + case -1: + if ($ftype == TType::STRUCT) { + $this->tAuthenticateReq = new \TAuthenticateReq(); + $xfer += $this->tAuthenticateReq->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; default: $xfer += $input->skip($ftype); break; @@ -1386,6 +1408,14 @@ class TCLIService_OpenSession_args { public function write($output) { $xfer = 0; $xfer += $output->writeStructBegin('TCLIService_OpenSession_args'); + if ($this->tAuthenticateReq !== null) { + if (!is_object($this->tAuthenticateReq)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('tAuthenticateReq', TType::STRUCT, -1); + $xfer += $this->tAuthenticateReq->write($output); + $xfer += $output->writeFieldEnd(); + } if ($this->req !== null) { if (!is_object($this->req)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); diff --git service-rpc/src/gen/thrift/gen-php/Types.php service-rpc/src/gen/thrift/gen-php/Types.php index 39572d4f09..7810d71394 100644 --- service-rpc/src/gen/thrift/gen-php/Types.php +++ service-rpc/src/gen/thrift/gen-php/Types.php @@ -4530,14 +4530,6 @@ class TOpenSessionReq { * @var int */ public $client_protocol = 9; - /** - * @var string - */ - public $username = null; - /** - * @var string - */ - public $password = null; /** * @var array */ @@ -4551,14 +4543,6 @@ class TOpenSessionReq { 'type' => TType::I32, ), 2 => array( - 'var' => 'username', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'password', - 'type' => TType::STRING, - ), - 4 => array( 'var' => 'configuration', 'type' => TType::MAP, 'ktype' => TType::STRING, @@ -4576,12 +4560,6 @@ class TOpenSessionReq { if (isset($vals['client_protocol'])) { $this->client_protocol = $vals['client_protocol']; } - if (isset($vals['username'])) { - $this->username = $vals['username']; - } - if (isset($vals['password'])) { - $this->password = $vals['password']; - } if (isset($vals['configuration'])) { $this->configuration = $vals['configuration']; } @@ -4615,20 +4593,6 @@ class TOpenSessionReq { } break; case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->username); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->password); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: if ($ftype == TType::MAP) { $this->configuration = array(); $_size125 = 0; @@ -4666,21 +4630,11 @@ class TOpenSessionReq { $xfer += $output->writeI32($this->client_protocol); $xfer += $output->writeFieldEnd(); } - if ($this->username !== null) { - $xfer += $output->writeFieldBegin('username', TType::STRING, 2); - $xfer += $output->writeString($this->username); - $xfer += $output->writeFieldEnd(); - } - if ($this->password !== null) { - $xfer += $output->writeFieldBegin('password', TType::STRING, 3); - $xfer += $output->writeString($this->password); - $xfer += $output->writeFieldEnd(); - } if ($this->configuration !== null) { if (!is_array($this->configuration)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('configuration', TType::MAP, 4); + $xfer += $output->writeFieldBegin('configuration', TType::MAP, 2); { $output->writeMapBegin(TType::STRING, TType::STRING, count($this->configuration)); { @@ -4701,6 +4655,104 @@ class TOpenSessionReq { } +class TAuthenticateReq { + static $_TSPEC; + + /** + * @var string + */ + public $username = null; + /** + * @var string + */ + public $password = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'username', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'password', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['username'])) { + $this->username = $vals['username']; + } + if (isset($vals['password'])) { + $this->password = $vals['password']; + } + } + } + + public function getName() { + return 'TAuthenticateReq'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->username); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->password); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('TAuthenticateReq'); + if ($this->username !== null) { + $xfer += $output->writeFieldBegin('username', TType::STRING, 1); + $xfer += $output->writeString($this->username); + $xfer += $output->writeFieldEnd(); + } + if ($this->password !== null) { + $xfer += $output->writeFieldBegin('password', TType::STRING, 2); + $xfer += $output->writeString($this->password); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + class TOpenSessionResp { static $_TSPEC; diff --git service-rpc/src/gen/thrift/gen-py/TCLIService/TCLIService-remote service-rpc/src/gen/thrift/gen-py/TCLIService/TCLIService-remote index fbbf9a64cf..54b7310090 100755 --- service-rpc/src/gen/thrift/gen-py/TCLIService/TCLIService-remote +++ service-rpc/src/gen/thrift/gen-py/TCLIService/TCLIService-remote @@ -24,7 +24,7 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help': print('Usage: ' + sys.argv[0] + ' [-h host[:port]] [-u url] [-f[ramed]] [-s[sl]] function [arg1 [arg2...]]') print('') print('Functions:') - print(' TOpenSessionResp OpenSession(TOpenSessionReq req)') + print(' TOpenSessionResp OpenSession(TOpenSessionReq req, TAuthenticateReq tAuthenticateReq)') print(' TCloseSessionResp CloseSession(TCloseSessionReq req)') print(' TGetInfoResp GetInfo(TGetInfoReq req)') print(' TExecuteStatementResp ExecuteStatement(TExecuteStatementReq req)') @@ -104,10 +104,10 @@ client = TCLIService.Client(protocol) transport.open() if cmd == 'OpenSession': - if len(args) != 1: - print('OpenSession requires 1 args') + if len(args) != 2: + print('OpenSession requires 2 args') sys.exit(1) - pp.pprint(client.OpenSession(eval(args[0]),)) + pp.pprint(client.OpenSession(eval(args[0]),eval(args[1]),)) elif cmd == 'CloseSession': if len(args) != 1: diff --git service-rpc/src/gen/thrift/gen-py/TCLIService/TCLIService.py service-rpc/src/gen/thrift/gen-py/TCLIService/TCLIService.py index 0725df9866..1f09fca5a8 100644 --- service-rpc/src/gen/thrift/gen-py/TCLIService/TCLIService.py +++ service-rpc/src/gen/thrift/gen-py/TCLIService/TCLIService.py @@ -19,10 +19,11 @@ class Iface: - def OpenSession(self, req): + def OpenSession(self, req, tAuthenticateReq): """ Parameters: - req + - tAuthenticateReq """ pass @@ -188,18 +189,20 @@ def __init__(self, iprot, oprot=None): self._oprot = oprot self._seqid = 0 - def OpenSession(self, req): + def OpenSession(self, req, tAuthenticateReq): """ Parameters: - req + - tAuthenticateReq """ - self.send_OpenSession(req) + self.send_OpenSession(req, tAuthenticateReq) return self.recv_OpenSession() - def send_OpenSession(self, req): + def send_OpenSession(self, req, tAuthenticateReq): self._oprot.writeMessageBegin('OpenSession', TMessageType.CALL, self._seqid) args = OpenSession_args() args.req = req + args.tAuthenticateReq = tAuthenticateReq args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() @@ -951,7 +954,7 @@ def process_OpenSession(self, seqid, iprot, oprot): iprot.readMessageEnd() result = OpenSession_result() try: - result.success = self._handler.OpenSession(args.req) + result.success = self._handler.OpenSession(args.req, args.tAuthenticateReq) msg_type = TMessageType.REPLY except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): raise @@ -1389,15 +1392,13 @@ class OpenSession_args: """ Attributes: - req + - tAuthenticateReq """ - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'req', (TOpenSessionReq, TOpenSessionReq.thrift_spec), None, ), # 1 - ) - - def __init__(self, req=None,): + thrift_spec = None + def __init__(self, req=None, tAuthenticateReq=None,): self.req = req + self.tAuthenticateReq = tAuthenticateReq def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -1414,6 +1415,12 @@ def read(self, iprot): self.req.read(iprot) else: iprot.skip(ftype) + elif fid == -1: + if ftype == TType.STRUCT: + self.tAuthenticateReq = TAuthenticateReq() + self.tAuthenticateReq.read(iprot) + else: + iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -1424,6 +1431,10 @@ def write(self, oprot): oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('OpenSession_args') + if self.tAuthenticateReq is not None: + oprot.writeFieldBegin('tAuthenticateReq', TType.STRUCT, -1) + self.tAuthenticateReq.write(oprot) + oprot.writeFieldEnd() if self.req is not None: oprot.writeFieldBegin('req', TType.STRUCT, 1) self.req.write(oprot) @@ -1438,6 +1449,7 @@ def validate(self): def __hash__(self): value = 17 value = (value * 31) ^ hash(self.req) + value = (value * 31) ^ hash(self.tAuthenticateReq) return value def __repr__(self): diff --git service-rpc/src/gen/thrift/gen-py/TCLIService/ttypes.py service-rpc/src/gen/thrift/gen-py/TCLIService/ttypes.py index 989ba4456f..888e7ed7c3 100644 --- service-rpc/src/gen/thrift/gen-py/TCLIService/ttypes.py +++ service-rpc/src/gen/thrift/gen-py/TCLIService/ttypes.py @@ -3525,23 +3525,17 @@ class TOpenSessionReq: """ Attributes: - client_protocol - - username - - password - configuration """ thrift_spec = ( None, # 0 (1, TType.I32, 'client_protocol', None, 9, ), # 1 - (2, TType.STRING, 'username', None, None, ), # 2 - (3, TType.STRING, 'password', None, None, ), # 3 - (4, TType.MAP, 'configuration', (TType.STRING,None,TType.STRING,None), None, ), # 4 + (2, TType.MAP, 'configuration', (TType.STRING,None,TType.STRING,None), None, ), # 2 ) - def __init__(self, client_protocol=thrift_spec[1][4], username=None, password=None, configuration=None,): + def __init__(self, client_protocol=thrift_spec[1][4], configuration=None,): self.client_protocol = client_protocol - self.username = username - self.password = password self.configuration = configuration def read(self, iprot): @@ -3559,16 +3553,6 @@ def read(self, iprot): else: iprot.skip(ftype) elif fid == 2: - if ftype == TType.STRING: - self.username = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.password = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: if ftype == TType.MAP: self.configuration = {} (_ktype126, _vtype127, _size125 ) = iprot.readMapBegin() @@ -3593,16 +3577,8 @@ def write(self, oprot): oprot.writeFieldBegin('client_protocol', TType.I32, 1) oprot.writeI32(self.client_protocol) oprot.writeFieldEnd() - if self.username is not None: - oprot.writeFieldBegin('username', TType.STRING, 2) - oprot.writeString(self.username) - oprot.writeFieldEnd() - if self.password is not None: - oprot.writeFieldBegin('password', TType.STRING, 3) - oprot.writeString(self.password) - oprot.writeFieldEnd() if self.configuration is not None: - oprot.writeFieldBegin('configuration', TType.MAP, 4) + oprot.writeFieldBegin('configuration', TType.MAP, 2) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.configuration)) for kiter132,viter133 in self.configuration.items(): oprot.writeString(kiter132) @@ -3621,9 +3597,85 @@ def validate(self): def __hash__(self): value = 17 value = (value * 31) ^ hash(self.client_protocol) + value = (value * 31) ^ hash(self.configuration) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class TAuthenticateReq: + """ + Attributes: + - username + - password + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'username', None, None, ), # 1 + (2, TType.STRING, 'password', None, None, ), # 2 + ) + + def __init__(self, username=None, password=None,): + self.username = username + self.password = password + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.username = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.password = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('TAuthenticateReq') + if self.username is not None: + oprot.writeFieldBegin('username', TType.STRING, 1) + oprot.writeString(self.username) + oprot.writeFieldEnd() + if self.password is not None: + oprot.writeFieldBegin('password', TType.STRING, 2) + oprot.writeString(self.password) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 value = (value * 31) ^ hash(self.username) value = (value * 31) ^ hash(self.password) - value = (value * 31) ^ hash(self.configuration) return value def __repr__(self): diff --git service-rpc/src/gen/thrift/gen-rb/t_c_l_i_service.rb service-rpc/src/gen/thrift/gen-rb/t_c_l_i_service.rb index 6637c4957a..35ba499b00 100644 --- service-rpc/src/gen/thrift/gen-rb/t_c_l_i_service.rb +++ service-rpc/src/gen/thrift/gen-rb/t_c_l_i_service.rb @@ -11,13 +11,13 @@ module TCLIService class Client include ::Thrift::Client - def OpenSession(req) - send_OpenSession(req) + def OpenSession(req, tAuthenticateReq) + send_OpenSession(req, tAuthenticateReq) return recv_OpenSession() end - def send_OpenSession(req) - send_message('OpenSession', OpenSession_args, :req => req) + def send_OpenSession(req, tAuthenticateReq) + send_message('OpenSession', OpenSession_args, :req => req, :tAuthenticateReq => tAuthenticateReq) end def recv_OpenSession() @@ -364,7 +364,7 @@ module TCLIService def process_OpenSession(seqid, iprot, oprot) args = read_args(iprot, OpenSession_args) result = OpenSession_result.new() - result.success = @handler.OpenSession(args.req) + result.success = @handler.OpenSession(args.req, args.tAuthenticateReq) write_result(result, oprot, 'OpenSession', seqid) end @@ -529,9 +529,11 @@ module TCLIService class OpenSession_args include ::Thrift::Struct, ::Thrift::Struct_Union REQ = 1 + TAUTHENTICATEREQ = -1 FIELDS = { - REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::TOpenSessionReq} + REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::TOpenSessionReq}, + TAUTHENTICATEREQ => {:type => ::Thrift::Types::STRUCT, :name => 'tAuthenticateReq', :class => ::TAuthenticateReq} } def struct_fields; FIELDS; end diff --git service-rpc/src/gen/thrift/gen-rb/t_c_l_i_service_types.rb service-rpc/src/gen/thrift/gen-rb/t_c_l_i_service_types.rb index 6ab4063bbd..25a96c4d2d 100644 --- service-rpc/src/gen/thrift/gen-rb/t_c_l_i_service_types.rb +++ service-rpc/src/gen/thrift/gen-rb/t_c_l_i_service_types.rb @@ -963,14 +963,10 @@ end class TOpenSessionReq include ::Thrift::Struct, ::Thrift::Struct_Union CLIENT_PROTOCOL = 1 - USERNAME = 2 - PASSWORD = 3 - CONFIGURATION = 4 + CONFIGURATION = 2 FIELDS = { CLIENT_PROTOCOL => {:type => ::Thrift::Types::I32, :name => 'client_protocol', :default => 9, :enum_class => ::TProtocolVersion}, - USERNAME => {:type => ::Thrift::Types::STRING, :name => 'username', :optional => true}, - PASSWORD => {:type => ::Thrift::Types::STRING, :name => 'password', :optional => true}, CONFIGURATION => {:type => ::Thrift::Types::MAP, :name => 'configuration', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}, :optional => true} } @@ -986,6 +982,24 @@ class TOpenSessionReq ::Thrift::Struct.generate_accessors self end +class TAuthenticateReq + include ::Thrift::Struct, ::Thrift::Struct_Union + USERNAME = 1 + PASSWORD = 2 + + FIELDS = { + USERNAME => {:type => ::Thrift::Types::STRING, :name => 'username', :optional => true}, + PASSWORD => {:type => ::Thrift::Types::STRING, :name => 'password', :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + class TOpenSessionResp include ::Thrift::Struct, ::Thrift::Struct_Union STATUS = 1 diff --git service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIService.java service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIService.java index 059e4c98dc..7374419ae2 100644 --- service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIService.java +++ service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIService.java @@ -24,6 +24,7 @@ import org.apache.hive.service.cli.SparkProgressMonitorStatusMapper; import org.apache.hive.service.rpc.thrift.TSetClientInfoReq; import org.apache.hive.service.rpc.thrift.TSetClientInfoResp; +import org.apache.hive.service.rpc.thrift.TAuthenticateReq; import java.io.IOException; import java.net.InetAddress; @@ -317,11 +318,11 @@ private TStatus unsecureTokenErrorStatus() { } @Override - public TOpenSessionResp OpenSession(TOpenSessionReq req) throws TException { + public TOpenSessionResp OpenSession(TOpenSessionReq req, TAuthenticateReq authenticateReq) throws TException { LOG.info("Client protocol version: " + req.getClient_protocol()); TOpenSessionResp resp = new TOpenSessionResp(); try { - SessionHandle sessionHandle = getSessionHandle(req, resp); + SessionHandle sessionHandle = getSessionHandle(req, authenticateReq, resp); resp.setSessionHandle(sessionHandle.toTSessionHandle()); Map configurationMap = new HashMap(); // Set the updated fetch size from the server into the configuration map for the client @@ -404,11 +405,13 @@ private String getIpAddress() { * 2. If hive.server2.allow.user.substitution = true: the username of the end user, * that the connecting user is trying to proxy for. * This includes a check whether the connecting user is allowed to proxy for the end user. + * + * @param tOpenSessionReq * @param req * @return * @throws HiveSQLException */ - private String getUserName(TOpenSessionReq req) throws HiveSQLException, IOException { + private String getUserName(TOpenSessionReq tOpenSessionReq, TAuthenticateReq req) throws HiveSQLException, IOException { String userName = null; if (hiveAuthFactory != null && hiveAuthFactory.isSASLWithKerberizedHadoop()) { @@ -433,7 +436,7 @@ private String getUserName(TOpenSessionReq req) throws HiveSQLException, IOExcep userName = getShortName(userName); } - String effectiveClientUser = getProxyUser(userName, req.getConfiguration(), getIpAddress()); + String effectiveClientUser = getProxyUser(userName, tOpenSessionReq.getConfiguration(), getIpAddress()); LOG.debug("Client's username: " + effectiveClientUser); return effectiveClientUser; } @@ -459,15 +462,17 @@ private String getShortName(String userName) throws IOException { /** * Create a session handle * @param req + * @param authenticateReq * @param res * @return * @throws HiveSQLException * @throws LoginException * @throws IOException */ - SessionHandle getSessionHandle(TOpenSessionReq req, TOpenSessionResp res) + SessionHandle getSessionHandle(TOpenSessionReq req, TAuthenticateReq authenticateReq, + TOpenSessionResp res) throws HiveSQLException, LoginException, IOException { - String userName = getUserName(req); + String userName = getUserName(req, authenticateReq); String ipAddress = getIpAddress(); TProtocolVersion protocol = getMinVersion(CLIService.SERVER_VERSION, req.getClient_protocol()); @@ -476,9 +481,9 @@ SessionHandle getSessionHandle(TOpenSessionReq req, TOpenSessionResp res) (userName != null)) { String delegationTokenStr = getDelegationToken(userName); sessionHandle = cliService.openSessionWithImpersonation(protocol, userName, - req.getPassword(), ipAddress, req.getConfiguration(), delegationTokenStr); + authenticateReq.getPassword(), ipAddress, req.getConfiguration(), delegationTokenStr); } else { - sessionHandle = cliService.openSession(protocol, userName, req.getPassword(), + sessionHandle = cliService.openSession(protocol, userName, authenticateReq.getPassword(), ipAddress, req.getConfiguration()); } res.setServerProtocolVersion(protocol); diff --git service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIServiceClient.java service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIServiceClient.java index df16b64e7f..a4a7e9bcfd 100644 --- service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIServiceClient.java +++ service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIServiceClient.java @@ -36,6 +36,7 @@ import org.apache.hive.service.cli.RowSetFactory; import org.apache.hive.service.cli.SessionHandle; import org.apache.hive.service.cli.TableSchema; +import org.apache.hive.service.rpc.thrift.TAuthenticateReq; import org.apache.hive.service.rpc.thrift.TCLIService; import org.apache.hive.service.rpc.thrift.TCancelDelegationTokenReq; import org.apache.hive.service.rpc.thrift.TCancelDelegationTokenResp; @@ -122,10 +123,11 @@ public SessionHandle openSession(String username, String password, throws HiveSQLException { try { TOpenSessionReq req = new TOpenSessionReq(); - req.setUsername(username); - req.setPassword(password); + TAuthenticateReq tAuthenticateReq = new TAuthenticateReq(); + tAuthenticateReq.setUsername(username); + tAuthenticateReq.setPassword(password); req.setConfiguration(configuration); - TOpenSessionResp resp = cliService.OpenSession(req); + TOpenSessionResp resp = cliService.OpenSession(req, tAuthenticateReq); checkStatus(resp.getStatus()); return new SessionHandle(resp.getSessionHandle(), resp.getServerProtocolVersion()); } catch (HiveSQLException e) {