diff --git jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java index 70cc34d91e..1f9504b27a 100644 --- jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java +++ jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java @@ -703,12 +703,12 @@ private void openSession() throws SQLException { openConf.put(HiveAuthConstants.HS2_PROXY_USER, sessVars.get(HiveAuthConstants.HS2_PROXY_USER)); } - openReq.setConfiguration(openConf); + openReq.getOptionalReq().setConfiguration(openConf); // Store the user name in the open request in case no non-sasl authentication if (JdbcConnectionParams.AUTH_SIMPLE.equals(sessConfMap.get(JdbcConnectionParams.AUTH_TYPE))) { - openReq.setUsername(sessConfMap.get(JdbcConnectionParams.AUTH_USER)); - openReq.setPassword(sessConfMap.get(JdbcConnectionParams.AUTH_PASSWD)); + openReq.getOptionalReq().setUsername(sessConfMap.get(JdbcConnectionParams.AUTH_USER)); + openReq.getOptionalReq().setPassword(sessConfMap.get(JdbcConnectionParams.AUTH_PASSWD)); } try { diff --git service-rpc/if/TCLIService.thrift service-rpc/if/TCLIService.thrift index 1cf8a918a3..896bd05527 100644 --- service-rpc/if/TCLIService.thrift +++ service-rpc/if/TCLIService.thrift @@ -566,21 +566,29 @@ struct TOperationHandle { // // Open a session (connection) on the server against // which operations may be executed. +// Need to differentiate between required and optional requirements, so that struct TOpenSessionReq { + 1: required TRequiredReq requiredReq + 2: optional TOptionalReq optionalReq +} + +struct TRequiredReq { // The version of the HiveServer2 protocol that the client is using. 1: required TProtocolVersion client_protocol = TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V10 +} + +struct TOptionalReq { // 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 - + 1: optional string username + 2: optional string password // Configuration overlay which is applied when the session is // first created. - 4: optional map configuration + 3: optional map configuration } struct TOpenSessionResp { diff --git service-rpc/src/gen/thrift/gen-cpp/TCLIService_types.cpp service-rpc/src/gen/thrift/gen-cpp/TCLIService_types.cpp index d312896c72..dea71623d2 100644 --- service-rpc/src/gen/thrift/gen-cpp/TCLIService_types.cpp +++ service-rpc/src/gen/thrift/gen-cpp/TCLIService_types.cpp @@ -4640,26 +4640,122 @@ TOpenSessionReq::~TOpenSessionReq() throw() { } -void TOpenSessionReq::__set_client_protocol(const TProtocolVersion::type val) { - this->client_protocol = val; +void TOpenSessionReq::__set_requiredReq(const TRequiredReq& val) { + this->requiredReq = val; } -void TOpenSessionReq::__set_username(const std::string& val) { - this->username = val; -__isset.username = true; +void TOpenSessionReq::__set_optionalReq(const TOptionalReq& val) { + this->optionalReq = val; +__isset.optionalReq = true; } -void TOpenSessionReq::__set_password(const std::string& val) { - this->password = val; -__isset.password = true; +uint32_t TOpenSessionReq::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; + + bool isset_requiredReq = false; + + 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_STRUCT) { + xfer += this->requiredReq.read(iprot); + isset_requiredReq = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->optionalReq.read(iprot); + this->__isset.optionalReq = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_requiredReq) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; } -void TOpenSessionReq::__set_configuration(const std::map & val) { - this->configuration = val; -__isset.configuration = true; +uint32_t TOpenSessionReq::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TOpenSessionReq"); + + xfer += oprot->writeFieldBegin("requiredReq", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->requiredReq.write(oprot); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.optionalReq) { + xfer += oprot->writeFieldBegin("optionalReq", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->optionalReq.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(TOpenSessionReq &a, TOpenSessionReq &b) { + using ::std::swap; + swap(a.requiredReq, b.requiredReq); + swap(a.optionalReq, b.optionalReq); + swap(a.__isset, b.__isset); +} + +TOpenSessionReq::TOpenSessionReq(const TOpenSessionReq& other181) { + requiredReq = other181.requiredReq; + optionalReq = other181.optionalReq; + __isset = other181.__isset; +} +TOpenSessionReq& TOpenSessionReq::operator=(const TOpenSessionReq& other182) { + requiredReq = other182.requiredReq; + optionalReq = other182.optionalReq; + __isset = other182.__isset; + return *this; +} +void TOpenSessionReq::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "TOpenSessionReq("; + out << "requiredReq=" << to_string(requiredReq); + out << ", " << "optionalReq="; (__isset.optionalReq ? (out << to_string(optionalReq)) : (out << "")); + out << ")"; } -uint32_t TOpenSessionReq::read(::apache::thrift::protocol::TProtocol* iprot) { + +TRequiredReq::~TRequiredReq() throw() { +} + + +void TRequiredReq::__set_client_protocol(const TProtocolVersion::type val) { + this->client_protocol = val; +} + +uint32_t TRequiredReq::read(::apache::thrift::protocol::TProtocol* iprot) { apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; @@ -4683,15 +4779,103 @@ uint32_t TOpenSessionReq::read(::apache::thrift::protocol::TProtocol* iprot) { { case 1: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast181; - xfer += iprot->readI32(ecast181); - this->client_protocol = (TProtocolVersion::type)ecast181; + int32_t ecast183; + xfer += iprot->readI32(ecast183); + this->client_protocol = (TProtocolVersion::type)ecast183; isset_client_protocol = true; } else { xfer += iprot->skip(ftype); } break; - case 2: + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_client_protocol) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t TRequiredReq::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TRequiredReq"); + + xfer += oprot->writeFieldBegin("client_protocol", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32((int32_t)this->client_protocol); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(TRequiredReq &a, TRequiredReq &b) { + using ::std::swap; + swap(a.client_protocol, b.client_protocol); +} + +TRequiredReq::TRequiredReq(const TRequiredReq& other184) { + client_protocol = other184.client_protocol; +} +TRequiredReq& TRequiredReq::operator=(const TRequiredReq& other185) { + client_protocol = other185.client_protocol; + return *this; +} +void TRequiredReq::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "TRequiredReq("; + out << "client_protocol=" << to_string(client_protocol); + out << ")"; +} + + +TOptionalReq::~TOptionalReq() throw() { +} + + +void TOptionalReq::__set_username(const std::string& val) { + this->username = val; +__isset.username = true; +} + +void TOptionalReq::__set_password(const std::string& val) { + this->password = val; +__isset.password = true; +} + +void TOptionalReq::__set_configuration(const std::map & val) { + this->configuration = val; +__isset.configuration = true; +} + +uint32_t TOptionalReq::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; @@ -4699,7 +4883,7 @@ uint32_t TOpenSessionReq::read(::apache::thrift::protocol::TProtocol* iprot) { xfer += iprot->skip(ftype); } break; - case 3: + case 2: if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->password); this->__isset.password = true; @@ -4707,21 +4891,21 @@ uint32_t TOpenSessionReq::read(::apache::thrift::protocol::TProtocol* iprot) { xfer += iprot->skip(ftype); } break; - case 4: + case 3: if (ftype == ::apache::thrift::protocol::T_MAP) { { this->configuration.clear(); - uint32_t _size182; - ::apache::thrift::protocol::TType _ktype183; - ::apache::thrift::protocol::TType _vtype184; - xfer += iprot->readMapBegin(_ktype183, _vtype184, _size182); - uint32_t _i186; - for (_i186 = 0; _i186 < _size182; ++_i186) + uint32_t _size186; + ::apache::thrift::protocol::TType _ktype187; + ::apache::thrift::protocol::TType _vtype188; + xfer += iprot->readMapBegin(_ktype187, _vtype188, _size186); + uint32_t _i190; + for (_i190 = 0; _i190 < _size186; ++_i190) { - std::string _key187; - xfer += iprot->readString(_key187); - std::string& _val188 = this->configuration[_key187]; - xfer += iprot->readString(_val188); + std::string _key191; + xfer += iprot->readString(_key191); + std::string& _val192 = this->configuration[_key191]; + xfer += iprot->readString(_val192); } xfer += iprot->readMapEnd(); } @@ -4739,39 +4923,33 @@ uint32_t TOpenSessionReq::read(::apache::thrift::protocol::TProtocol* iprot) { xfer += iprot->readStructEnd(); - if (!isset_client_protocol) - throw TProtocolException(TProtocolException::INVALID_DATA); return xfer; } -uint32_t TOpenSessionReq::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t TOptionalReq::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("TOpenSessionReq"); - - xfer += oprot->writeFieldBegin("client_protocol", ::apache::thrift::protocol::T_I32, 1); - xfer += oprot->writeI32((int32_t)this->client_protocol); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeStructBegin("TOptionalReq"); if (this->__isset.username) { - xfer += oprot->writeFieldBegin("username", ::apache::thrift::protocol::T_STRING, 2); + 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, 3); + xfer += oprot->writeFieldBegin("password", ::apache::thrift::protocol::T_STRING, 2); 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, 3); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->configuration.size())); - std::map ::const_iterator _iter189; - for (_iter189 = this->configuration.begin(); _iter189 != this->configuration.end(); ++_iter189) + std::map ::const_iterator _iter193; + for (_iter193 = this->configuration.begin(); _iter193 != this->configuration.end(); ++_iter193) { - xfer += oprot->writeString(_iter189->first); - xfer += oprot->writeString(_iter189->second); + xfer += oprot->writeString(_iter193->first); + xfer += oprot->writeString(_iter193->second); } xfer += oprot->writeMapEnd(); } @@ -4782,35 +4960,31 @@ uint32_t TOpenSessionReq::write(::apache::thrift::protocol::TProtocol* oprot) co return xfer; } -void swap(TOpenSessionReq &a, TOpenSessionReq &b) { +void swap(TOptionalReq &a, TOptionalReq &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; +TOptionalReq::TOptionalReq(const TOptionalReq& other194) { + username = other194.username; + password = other194.password; + configuration = other194.configuration; + __isset = other194.__isset; } -TOpenSessionReq& TOpenSessionReq::operator=(const TOpenSessionReq& other191) { - client_protocol = other191.client_protocol; - username = other191.username; - password = other191.password; - configuration = other191.configuration; - __isset = other191.__isset; +TOptionalReq& TOptionalReq::operator=(const TOptionalReq& other195) { + username = other195.username; + password = other195.password; + configuration = other195.configuration; + __isset = other195.__isset; return *this; } -void TOpenSessionReq::printTo(std::ostream& out) const { +void TOptionalReq::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 << "TOptionalReq("; + 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 << ")"; @@ -4872,9 +5046,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 ecast196; + xfer += iprot->readI32(ecast196); + this->serverProtocolVersion = (TProtocolVersion::type)ecast196; isset_serverProtocolVersion = true; } else { xfer += iprot->skip(ftype); @@ -4892,17 +5066,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 _size197; + ::apache::thrift::protocol::TType _ktype198; + ::apache::thrift::protocol::TType _vtype199; + xfer += iprot->readMapBegin(_ktype198, _vtype199, _size197); + uint32_t _i201; + for (_i201 = 0; _i201 < _size197; ++_i201) { - std::string _key198; - xfer += iprot->readString(_key198); - std::string& _val199 = this->configuration[_key198]; - xfer += iprot->readString(_val199); + std::string _key202; + xfer += iprot->readString(_key202); + std::string& _val203 = this->configuration[_key202]; + xfer += iprot->readString(_val203); } xfer += iprot->readMapEnd(); } @@ -4949,11 +5123,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 _iter204; + for (_iter204 = this->configuration.begin(); _iter204 != this->configuration.end(); ++_iter204) { - xfer += oprot->writeString(_iter200->first); - xfer += oprot->writeString(_iter200->second); + xfer += oprot->writeString(_iter204->first); + xfer += oprot->writeString(_iter204->second); } xfer += oprot->writeMapEnd(); } @@ -4973,19 +5147,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& other205) { + status = other205.status; + serverProtocolVersion = other205.serverProtocolVersion; + sessionHandle = other205.sessionHandle; + configuration = other205.configuration; + __isset = other205.__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& other206) { + status = other206.status; + serverProtocolVersion = other206.serverProtocolVersion; + sessionHandle = other206.sessionHandle; + configuration = other206.configuration; + __isset = other206.__isset; return *this; } void TOpenSessionResp::printTo(std::ostream& out) const { @@ -5046,17 +5220,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 _size207; + ::apache::thrift::protocol::TType _ktype208; + ::apache::thrift::protocol::TType _vtype209; + xfer += iprot->readMapBegin(_ktype208, _vtype209, _size207); + uint32_t _i211; + for (_i211 = 0; _i211 < _size207; ++_i211) { - std::string _key208; - xfer += iprot->readString(_key208); - std::string& _val209 = this->configuration[_key208]; - xfer += iprot->readString(_val209); + std::string _key212; + xfer += iprot->readString(_key212); + std::string& _val213 = this->configuration[_key212]; + xfer += iprot->readString(_val213); } xfer += iprot->readMapEnd(); } @@ -5092,11 +5266,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 _iter214; + for (_iter214 = this->configuration.begin(); _iter214 != this->configuration.end(); ++_iter214) { - xfer += oprot->writeString(_iter210->first); - xfer += oprot->writeString(_iter210->second); + xfer += oprot->writeString(_iter214->first); + xfer += oprot->writeString(_iter214->second); } xfer += oprot->writeMapEnd(); } @@ -5114,15 +5288,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& other215) { + sessionHandle = other215.sessionHandle; + configuration = other215.configuration; + __isset = other215.__isset; } -TSetClientInfoReq& TSetClientInfoReq::operator=(const TSetClientInfoReq& other212) { - sessionHandle = other212.sessionHandle; - configuration = other212.configuration; - __isset = other212.__isset; +TSetClientInfoReq& TSetClientInfoReq::operator=(const TSetClientInfoReq& other216) { + sessionHandle = other216.sessionHandle; + configuration = other216.configuration; + __isset = other216.__isset; return *this; } void TSetClientInfoReq::printTo(std::ostream& out) const { @@ -5205,11 +5379,11 @@ void swap(TSetClientInfoResp &a, TSetClientInfoResp &b) { swap(a.status, b.status); } -TSetClientInfoResp::TSetClientInfoResp(const TSetClientInfoResp& other213) { - status = other213.status; +TSetClientInfoResp::TSetClientInfoResp(const TSetClientInfoResp& other217) { + status = other217.status; } -TSetClientInfoResp& TSetClientInfoResp::operator=(const TSetClientInfoResp& other214) { - status = other214.status; +TSetClientInfoResp& TSetClientInfoResp::operator=(const TSetClientInfoResp& other218) { + status = other218.status; return *this; } void TSetClientInfoResp::printTo(std::ostream& out) const { @@ -5291,11 +5465,11 @@ void swap(TCloseSessionReq &a, TCloseSessionReq &b) { swap(a.sessionHandle, b.sessionHandle); } -TCloseSessionReq::TCloseSessionReq(const TCloseSessionReq& other215) { - sessionHandle = other215.sessionHandle; +TCloseSessionReq::TCloseSessionReq(const TCloseSessionReq& other219) { + sessionHandle = other219.sessionHandle; } -TCloseSessionReq& TCloseSessionReq::operator=(const TCloseSessionReq& other216) { - sessionHandle = other216.sessionHandle; +TCloseSessionReq& TCloseSessionReq::operator=(const TCloseSessionReq& other220) { + sessionHandle = other220.sessionHandle; return *this; } void TCloseSessionReq::printTo(std::ostream& out) const { @@ -5377,11 +5551,11 @@ void swap(TCloseSessionResp &a, TCloseSessionResp &b) { swap(a.status, b.status); } -TCloseSessionResp::TCloseSessionResp(const TCloseSessionResp& other217) { - status = other217.status; +TCloseSessionResp::TCloseSessionResp(const TCloseSessionResp& other221) { + status = other221.status; } -TCloseSessionResp& TCloseSessionResp::operator=(const TCloseSessionResp& other218) { - status = other218.status; +TCloseSessionResp& TCloseSessionResp::operator=(const TCloseSessionResp& other222) { + status = other222.status; return *this; } void TCloseSessionResp::printTo(std::ostream& out) const { @@ -5546,23 +5720,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& other223) { + stringValue = other223.stringValue; + smallIntValue = other223.smallIntValue; + integerBitmask = other223.integerBitmask; + integerFlag = other223.integerFlag; + binaryValue = other223.binaryValue; + lenValue = other223.lenValue; + __isset = other223.__isset; +} +TGetInfoValue& TGetInfoValue::operator=(const TGetInfoValue& other224) { + stringValue = other224.stringValue; + smallIntValue = other224.smallIntValue; + integerBitmask = other224.integerBitmask; + integerFlag = other224.integerFlag; + binaryValue = other224.binaryValue; + lenValue = other224.lenValue; + __isset = other224.__isset; return *this; } void TGetInfoValue::printTo(std::ostream& out) const { @@ -5623,9 +5797,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 ecast225; + xfer += iprot->readI32(ecast225); + this->infoType = (TGetInfoType::type)ecast225; isset_infoType = true; } else { xfer += iprot->skip(ftype); @@ -5671,13 +5845,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& other226) { + sessionHandle = other226.sessionHandle; + infoType = other226.infoType; } -TGetInfoReq& TGetInfoReq::operator=(const TGetInfoReq& other223) { - sessionHandle = other223.sessionHandle; - infoType = other223.infoType; +TGetInfoReq& TGetInfoReq::operator=(const TGetInfoReq& other227) { + sessionHandle = other227.sessionHandle; + infoType = other227.infoType; return *this; } void TGetInfoReq::printTo(std::ostream& out) const { @@ -5780,13 +5954,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& other228) { + status = other228.status; + infoValue = other228.infoValue; } -TGetInfoResp& TGetInfoResp::operator=(const TGetInfoResp& other225) { - status = other225.status; - infoValue = other225.infoValue; +TGetInfoResp& TGetInfoResp::operator=(const TGetInfoResp& other229) { + status = other229.status; + infoValue = other229.infoValue; return *this; } void TGetInfoResp::printTo(std::ostream& out) const { @@ -5868,17 +6042,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 _size230; + ::apache::thrift::protocol::TType _ktype231; + ::apache::thrift::protocol::TType _vtype232; + xfer += iprot->readMapBegin(_ktype231, _vtype232, _size230); + uint32_t _i234; + for (_i234 = 0; _i234 < _size230; ++_i234) { - std::string _key231; - xfer += iprot->readString(_key231); - std::string& _val232 = this->confOverlay[_key231]; - xfer += iprot->readString(_val232); + std::string _key235; + xfer += iprot->readString(_key235); + std::string& _val236 = this->confOverlay[_key235]; + xfer += iprot->readString(_val236); } xfer += iprot->readMapEnd(); } @@ -5936,11 +6110,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 _iter237; + for (_iter237 = this->confOverlay.begin(); _iter237 != this->confOverlay.end(); ++_iter237) { - xfer += oprot->writeString(_iter233->first); - xfer += oprot->writeString(_iter233->second); + xfer += oprot->writeString(_iter237->first); + xfer += oprot->writeString(_iter237->second); } xfer += oprot->writeMapEnd(); } @@ -5971,21 +6145,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& other238) { + sessionHandle = other238.sessionHandle; + statement = other238.statement; + confOverlay = other238.confOverlay; + runAsync = other238.runAsync; + queryTimeout = other238.queryTimeout; + __isset = other238.__isset; +} +TExecuteStatementReq& TExecuteStatementReq::operator=(const TExecuteStatementReq& other239) { + sessionHandle = other239.sessionHandle; + statement = other239.statement; + confOverlay = other239.confOverlay; + runAsync = other239.runAsync; + queryTimeout = other239.queryTimeout; + __isset = other239.__isset; return *this; } void TExecuteStatementReq::printTo(std::ostream& out) const { @@ -6091,15 +6265,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& other240) { + status = other240.status; + operationHandle = other240.operationHandle; + __isset = other240.__isset; } -TExecuteStatementResp& TExecuteStatementResp::operator=(const TExecuteStatementResp& other237) { - status = other237.status; - operationHandle = other237.operationHandle; - __isset = other237.__isset; +TExecuteStatementResp& TExecuteStatementResp::operator=(const TExecuteStatementResp& other241) { + status = other241.status; + operationHandle = other241.operationHandle; + __isset = other241.__isset; return *this; } void TExecuteStatementResp::printTo(std::ostream& out) const { @@ -6182,11 +6356,11 @@ void swap(TGetTypeInfoReq &a, TGetTypeInfoReq &b) { swap(a.sessionHandle, b.sessionHandle); } -TGetTypeInfoReq::TGetTypeInfoReq(const TGetTypeInfoReq& other238) { - sessionHandle = other238.sessionHandle; +TGetTypeInfoReq::TGetTypeInfoReq(const TGetTypeInfoReq& other242) { + sessionHandle = other242.sessionHandle; } -TGetTypeInfoReq& TGetTypeInfoReq::operator=(const TGetTypeInfoReq& other239) { - sessionHandle = other239.sessionHandle; +TGetTypeInfoReq& TGetTypeInfoReq::operator=(const TGetTypeInfoReq& other243) { + sessionHandle = other243.sessionHandle; return *this; } void TGetTypeInfoReq::printTo(std::ostream& out) const { @@ -6288,15 +6462,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& other244) { + status = other244.status; + operationHandle = other244.operationHandle; + __isset = other244.__isset; } -TGetTypeInfoResp& TGetTypeInfoResp::operator=(const TGetTypeInfoResp& other241) { - status = other241.status; - operationHandle = other241.operationHandle; - __isset = other241.__isset; +TGetTypeInfoResp& TGetTypeInfoResp::operator=(const TGetTypeInfoResp& other245) { + status = other245.status; + operationHandle = other245.operationHandle; + __isset = other245.__isset; return *this; } void TGetTypeInfoResp::printTo(std::ostream& out) const { @@ -6379,11 +6553,11 @@ void swap(TGetCatalogsReq &a, TGetCatalogsReq &b) { swap(a.sessionHandle, b.sessionHandle); } -TGetCatalogsReq::TGetCatalogsReq(const TGetCatalogsReq& other242) { - sessionHandle = other242.sessionHandle; +TGetCatalogsReq::TGetCatalogsReq(const TGetCatalogsReq& other246) { + sessionHandle = other246.sessionHandle; } -TGetCatalogsReq& TGetCatalogsReq::operator=(const TGetCatalogsReq& other243) { - sessionHandle = other243.sessionHandle; +TGetCatalogsReq& TGetCatalogsReq::operator=(const TGetCatalogsReq& other247) { + sessionHandle = other247.sessionHandle; return *this; } void TGetCatalogsReq::printTo(std::ostream& out) const { @@ -6485,15 +6659,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& other248) { + status = other248.status; + operationHandle = other248.operationHandle; + __isset = other248.__isset; } -TGetCatalogsResp& TGetCatalogsResp::operator=(const TGetCatalogsResp& other245) { - status = other245.status; - operationHandle = other245.operationHandle; - __isset = other245.__isset; +TGetCatalogsResp& TGetCatalogsResp::operator=(const TGetCatalogsResp& other249) { + status = other249.status; + operationHandle = other249.operationHandle; + __isset = other249.__isset; return *this; } void TGetCatalogsResp::printTo(std::ostream& out) const { @@ -6615,17 +6789,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& other250) { + sessionHandle = other250.sessionHandle; + catalogName = other250.catalogName; + schemaName = other250.schemaName; + __isset = other250.__isset; } -TGetSchemasReq& TGetSchemasReq::operator=(const TGetSchemasReq& other247) { - sessionHandle = other247.sessionHandle; - catalogName = other247.catalogName; - schemaName = other247.schemaName; - __isset = other247.__isset; +TGetSchemasReq& TGetSchemasReq::operator=(const TGetSchemasReq& other251) { + sessionHandle = other251.sessionHandle; + catalogName = other251.catalogName; + schemaName = other251.schemaName; + __isset = other251.__isset; return *this; } void TGetSchemasReq::printTo(std::ostream& out) const { @@ -6729,15 +6903,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& other252) { + status = other252.status; + operationHandle = other252.operationHandle; + __isset = other252.__isset; } -TGetSchemasResp& TGetSchemasResp::operator=(const TGetSchemasResp& other249) { - status = other249.status; - operationHandle = other249.operationHandle; - __isset = other249.__isset; +TGetSchemasResp& TGetSchemasResp::operator=(const TGetSchemasResp& other253) { + status = other253.status; + operationHandle = other253.operationHandle; + __isset = other253.__isset; return *this; } void TGetSchemasResp::printTo(std::ostream& out) const { @@ -6835,14 +7009,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 _size254; + ::apache::thrift::protocol::TType _etype257; + xfer += iprot->readListBegin(_etype257, _size254); + this->tableTypes.resize(_size254); + uint32_t _i258; + for (_i258 = 0; _i258 < _size254; ++_i258) { - xfer += iprot->readString(this->tableTypes[_i254]); + xfer += iprot->readString(this->tableTypes[_i258]); } xfer += iprot->readListEnd(); } @@ -6893,10 +7067,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 _iter259; + for (_iter259 = this->tableTypes.begin(); _iter259 != this->tableTypes.end(); ++_iter259) { - xfer += oprot->writeString((*_iter255)); + xfer += oprot->writeString((*_iter259)); } xfer += oprot->writeListEnd(); } @@ -6917,21 +7091,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& other260) { + sessionHandle = other260.sessionHandle; + catalogName = other260.catalogName; + schemaName = other260.schemaName; + tableName = other260.tableName; + tableTypes = other260.tableTypes; + __isset = other260.__isset; +} +TGetTablesReq& TGetTablesReq::operator=(const TGetTablesReq& other261) { + sessionHandle = other261.sessionHandle; + catalogName = other261.catalogName; + schemaName = other261.schemaName; + tableName = other261.tableName; + tableTypes = other261.tableTypes; + __isset = other261.__isset; return *this; } void TGetTablesReq::printTo(std::ostream& out) const { @@ -7037,15 +7211,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& other262) { + status = other262.status; + operationHandle = other262.operationHandle; + __isset = other262.__isset; } -TGetTablesResp& TGetTablesResp::operator=(const TGetTablesResp& other259) { - status = other259.status; - operationHandle = other259.operationHandle; - __isset = other259.__isset; +TGetTablesResp& TGetTablesResp::operator=(const TGetTablesResp& other263) { + status = other263.status; + operationHandle = other263.operationHandle; + __isset = other263.__isset; return *this; } void TGetTablesResp::printTo(std::ostream& out) const { @@ -7128,11 +7302,11 @@ void swap(TGetTableTypesReq &a, TGetTableTypesReq &b) { swap(a.sessionHandle, b.sessionHandle); } -TGetTableTypesReq::TGetTableTypesReq(const TGetTableTypesReq& other260) { - sessionHandle = other260.sessionHandle; +TGetTableTypesReq::TGetTableTypesReq(const TGetTableTypesReq& other264) { + sessionHandle = other264.sessionHandle; } -TGetTableTypesReq& TGetTableTypesReq::operator=(const TGetTableTypesReq& other261) { - sessionHandle = other261.sessionHandle; +TGetTableTypesReq& TGetTableTypesReq::operator=(const TGetTableTypesReq& other265) { + sessionHandle = other265.sessionHandle; return *this; } void TGetTableTypesReq::printTo(std::ostream& out) const { @@ -7234,15 +7408,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& other266) { + status = other266.status; + operationHandle = other266.operationHandle; + __isset = other266.__isset; } -TGetTableTypesResp& TGetTableTypesResp::operator=(const TGetTableTypesResp& other263) { - status = other263.status; - operationHandle = other263.operationHandle; - __isset = other263.__isset; +TGetTableTypesResp& TGetTableTypesResp::operator=(const TGetTableTypesResp& other267) { + status = other267.status; + operationHandle = other267.operationHandle; + __isset = other267.__isset; return *this; } void TGetTableTypesResp::printTo(std::ostream& out) const { @@ -7402,21 +7576,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& other268) { + sessionHandle = other268.sessionHandle; + catalogName = other268.catalogName; + schemaName = other268.schemaName; + tableName = other268.tableName; + columnName = other268.columnName; + __isset = other268.__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& other269) { + sessionHandle = other269.sessionHandle; + catalogName = other269.catalogName; + schemaName = other269.schemaName; + tableName = other269.tableName; + columnName = other269.columnName; + __isset = other269.__isset; return *this; } void TGetColumnsReq::printTo(std::ostream& out) const { @@ -7522,15 +7696,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& other270) { + status = other270.status; + operationHandle = other270.operationHandle; + __isset = other270.__isset; } -TGetColumnsResp& TGetColumnsResp::operator=(const TGetColumnsResp& other267) { - status = other267.status; - operationHandle = other267.operationHandle; - __isset = other267.__isset; +TGetColumnsResp& TGetColumnsResp::operator=(const TGetColumnsResp& other271) { + status = other271.status; + operationHandle = other271.operationHandle; + __isset = other271.__isset; return *this; } void TGetColumnsResp::printTo(std::ostream& out) const { @@ -7672,19 +7846,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& other272) { + sessionHandle = other272.sessionHandle; + catalogName = other272.catalogName; + schemaName = other272.schemaName; + functionName = other272.functionName; + __isset = other272.__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& other273) { + sessionHandle = other273.sessionHandle; + catalogName = other273.catalogName; + schemaName = other273.schemaName; + functionName = other273.functionName; + __isset = other273.__isset; return *this; } void TGetFunctionsReq::printTo(std::ostream& out) const { @@ -7789,15 +7963,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& other274) { + status = other274.status; + operationHandle = other274.operationHandle; + __isset = other274.__isset; } -TGetFunctionsResp& TGetFunctionsResp::operator=(const TGetFunctionsResp& other271) { - status = other271.status; - operationHandle = other271.operationHandle; - __isset = other271.__isset; +TGetFunctionsResp& TGetFunctionsResp::operator=(const TGetFunctionsResp& other275) { + status = other275.status; + operationHandle = other275.operationHandle; + __isset = other275.__isset; return *this; } void TGetFunctionsResp::printTo(std::ostream& out) const { @@ -7938,19 +8112,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& other276) { + sessionHandle = other276.sessionHandle; + catalogName = other276.catalogName; + schemaName = other276.schemaName; + tableName = other276.tableName; + __isset = other276.__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& other277) { + sessionHandle = other277.sessionHandle; + catalogName = other277.catalogName; + schemaName = other277.schemaName; + tableName = other277.tableName; + __isset = other277.__isset; return *this; } void TGetPrimaryKeysReq::printTo(std::ostream& out) const { @@ -8055,15 +8229,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& other278) { + status = other278.status; + operationHandle = other278.operationHandle; + __isset = other278.__isset; } -TGetPrimaryKeysResp& TGetPrimaryKeysResp::operator=(const TGetPrimaryKeysResp& other275) { - status = other275.status; - operationHandle = other275.operationHandle; - __isset = other275.__isset; +TGetPrimaryKeysResp& TGetPrimaryKeysResp::operator=(const TGetPrimaryKeysResp& other279) { + status = other279.status; + operationHandle = other279.operationHandle; + __isset = other279.__isset; return *this; } void TGetPrimaryKeysResp::printTo(std::ostream& out) const { @@ -8261,25 +8435,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& other280) { + sessionHandle = other280.sessionHandle; + parentCatalogName = other280.parentCatalogName; + parentSchemaName = other280.parentSchemaName; + parentTableName = other280.parentTableName; + foreignCatalogName = other280.foreignCatalogName; + foreignSchemaName = other280.foreignSchemaName; + foreignTableName = other280.foreignTableName; + __isset = other280.__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& other281) { + sessionHandle = other281.sessionHandle; + parentCatalogName = other281.parentCatalogName; + parentSchemaName = other281.parentSchemaName; + parentTableName = other281.parentTableName; + foreignCatalogName = other281.foreignCatalogName; + foreignSchemaName = other281.foreignSchemaName; + foreignTableName = other281.foreignTableName; + __isset = other281.__isset; return *this; } void TGetCrossReferenceReq::printTo(std::ostream& out) const { @@ -8387,15 +8561,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& other282) { + status = other282.status; + operationHandle = other282.operationHandle; + __isset = other282.__isset; } -TGetCrossReferenceResp& TGetCrossReferenceResp::operator=(const TGetCrossReferenceResp& other279) { - status = other279.status; - operationHandle = other279.operationHandle; - __isset = other279.__isset; +TGetCrossReferenceResp& TGetCrossReferenceResp::operator=(const TGetCrossReferenceResp& other283) { + status = other283.status; + operationHandle = other283.operationHandle; + __isset = other283.__isset; return *this; } void TGetCrossReferenceResp::printTo(std::ostream& out) const { @@ -8498,15 +8672,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& other284) { + operationHandle = other284.operationHandle; + getProgressUpdate = other284.getProgressUpdate; + __isset = other284.__isset; } -TGetOperationStatusReq& TGetOperationStatusReq::operator=(const TGetOperationStatusReq& other281) { - operationHandle = other281.operationHandle; - getProgressUpdate = other281.getProgressUpdate; - __isset = other281.__isset; +TGetOperationStatusReq& TGetOperationStatusReq::operator=(const TGetOperationStatusReq& other285) { + operationHandle = other285.operationHandle; + getProgressUpdate = other285.getProgressUpdate; + __isset = other285.__isset; return *this; } void TGetOperationStatusReq::printTo(std::ostream& out) const { @@ -8608,9 +8782,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 ecast286; + xfer += iprot->readI32(ecast286); + this->operationState = (TOperationState::type)ecast286; this->__isset.operationState = true; } else { xfer += iprot->skip(ftype); @@ -8782,33 +8956,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& other287) { + status = other287.status; + operationState = other287.operationState; + sqlState = other287.sqlState; + errorCode = other287.errorCode; + errorMessage = other287.errorMessage; + taskStatus = other287.taskStatus; + operationStarted = other287.operationStarted; + operationCompleted = other287.operationCompleted; + hasResultSet = other287.hasResultSet; + progressUpdateResponse = other287.progressUpdateResponse; + numModifiedRows = other287.numModifiedRows; + __isset = other287.__isset; +} +TGetOperationStatusResp& TGetOperationStatusResp::operator=(const TGetOperationStatusResp& other288) { + status = other288.status; + operationState = other288.operationState; + sqlState = other288.sqlState; + errorCode = other288.errorCode; + errorMessage = other288.errorMessage; + taskStatus = other288.taskStatus; + operationStarted = other288.operationStarted; + operationCompleted = other288.operationCompleted; + hasResultSet = other288.hasResultSet; + progressUpdateResponse = other288.progressUpdateResponse; + numModifiedRows = other288.numModifiedRows; + __isset = other288.__isset; return *this; } void TGetOperationStatusResp::printTo(std::ostream& out) const { @@ -8900,11 +9074,11 @@ void swap(TCancelOperationReq &a, TCancelOperationReq &b) { swap(a.operationHandle, b.operationHandle); } -TCancelOperationReq::TCancelOperationReq(const TCancelOperationReq& other285) { - operationHandle = other285.operationHandle; +TCancelOperationReq::TCancelOperationReq(const TCancelOperationReq& other289) { + operationHandle = other289.operationHandle; } -TCancelOperationReq& TCancelOperationReq::operator=(const TCancelOperationReq& other286) { - operationHandle = other286.operationHandle; +TCancelOperationReq& TCancelOperationReq::operator=(const TCancelOperationReq& other290) { + operationHandle = other290.operationHandle; return *this; } void TCancelOperationReq::printTo(std::ostream& out) const { @@ -8986,11 +9160,11 @@ void swap(TCancelOperationResp &a, TCancelOperationResp &b) { swap(a.status, b.status); } -TCancelOperationResp::TCancelOperationResp(const TCancelOperationResp& other287) { - status = other287.status; +TCancelOperationResp::TCancelOperationResp(const TCancelOperationResp& other291) { + status = other291.status; } -TCancelOperationResp& TCancelOperationResp::operator=(const TCancelOperationResp& other288) { - status = other288.status; +TCancelOperationResp& TCancelOperationResp::operator=(const TCancelOperationResp& other292) { + status = other292.status; return *this; } void TCancelOperationResp::printTo(std::ostream& out) const { @@ -9072,11 +9246,11 @@ void swap(TCloseOperationReq &a, TCloseOperationReq &b) { swap(a.operationHandle, b.operationHandle); } -TCloseOperationReq::TCloseOperationReq(const TCloseOperationReq& other289) { - operationHandle = other289.operationHandle; +TCloseOperationReq::TCloseOperationReq(const TCloseOperationReq& other293) { + operationHandle = other293.operationHandle; } -TCloseOperationReq& TCloseOperationReq::operator=(const TCloseOperationReq& other290) { - operationHandle = other290.operationHandle; +TCloseOperationReq& TCloseOperationReq::operator=(const TCloseOperationReq& other294) { + operationHandle = other294.operationHandle; return *this; } void TCloseOperationReq::printTo(std::ostream& out) const { @@ -9158,11 +9332,11 @@ void swap(TCloseOperationResp &a, TCloseOperationResp &b) { swap(a.status, b.status); } -TCloseOperationResp::TCloseOperationResp(const TCloseOperationResp& other291) { - status = other291.status; +TCloseOperationResp::TCloseOperationResp(const TCloseOperationResp& other295) { + status = other295.status; } -TCloseOperationResp& TCloseOperationResp::operator=(const TCloseOperationResp& other292) { - status = other292.status; +TCloseOperationResp& TCloseOperationResp::operator=(const TCloseOperationResp& other296) { + status = other296.status; return *this; } void TCloseOperationResp::printTo(std::ostream& out) const { @@ -9244,11 +9418,11 @@ void swap(TGetResultSetMetadataReq &a, TGetResultSetMetadataReq &b) { swap(a.operationHandle, b.operationHandle); } -TGetResultSetMetadataReq::TGetResultSetMetadataReq(const TGetResultSetMetadataReq& other293) { - operationHandle = other293.operationHandle; +TGetResultSetMetadataReq::TGetResultSetMetadataReq(const TGetResultSetMetadataReq& other297) { + operationHandle = other297.operationHandle; } -TGetResultSetMetadataReq& TGetResultSetMetadataReq::operator=(const TGetResultSetMetadataReq& other294) { - operationHandle = other294.operationHandle; +TGetResultSetMetadataReq& TGetResultSetMetadataReq::operator=(const TGetResultSetMetadataReq& other298) { + operationHandle = other298.operationHandle; return *this; } void TGetResultSetMetadataReq::printTo(std::ostream& out) const { @@ -9350,15 +9524,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& other299) { + status = other299.status; + schema = other299.schema; + __isset = other299.__isset; } -TGetResultSetMetadataResp& TGetResultSetMetadataResp::operator=(const TGetResultSetMetadataResp& other296) { - status = other296.status; - schema = other296.schema; - __isset = other296.__isset; +TGetResultSetMetadataResp& TGetResultSetMetadataResp::operator=(const TGetResultSetMetadataResp& other300) { + status = other300.status; + schema = other300.schema; + __isset = other300.__isset; return *this; } void TGetResultSetMetadataResp::printTo(std::ostream& out) const { @@ -9425,9 +9599,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 ecast301; + xfer += iprot->readI32(ecast301); + this->orientation = (TFetchOrientation::type)ecast301; isset_orientation = true; } else { xfer += iprot->skip(ftype); @@ -9503,19 +9677,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::operator=(const TFetchResultsReq& other299) { - operationHandle = other299.operationHandle; - orientation = other299.orientation; - maxRows = other299.maxRows; - fetchType = other299.fetchType; - __isset = other299.__isset; +TFetchResultsReq::TFetchResultsReq(const TFetchResultsReq& other302) { + operationHandle = other302.operationHandle; + orientation = other302.orientation; + maxRows = other302.maxRows; + fetchType = other302.fetchType; + __isset = other302.__isset; +} +TFetchResultsReq& TFetchResultsReq::operator=(const TFetchResultsReq& other303) { + operationHandle = other303.operationHandle; + orientation = other303.orientation; + maxRows = other303.maxRows; + fetchType = other303.fetchType; + __isset = other303.__isset; return *this; } void TFetchResultsReq::printTo(std::ostream& out) const { @@ -9639,17 +9813,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& other304) { + status = other304.status; + hasMoreRows = other304.hasMoreRows; + results = other304.results; + __isset = other304.__isset; } -TFetchResultsResp& TFetchResultsResp::operator=(const TFetchResultsResp& other301) { - status = other301.status; - hasMoreRows = other301.hasMoreRows; - results = other301.results; - __isset = other301.__isset; +TFetchResultsResp& TFetchResultsResp::operator=(const TFetchResultsResp& other305) { + status = other305.status; + hasMoreRows = other305.hasMoreRows; + results = other305.results; + __isset = other305.__isset; return *this; } void TFetchResultsResp::printTo(std::ostream& out) const { @@ -9773,15 +9947,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& other306) { + sessionHandle = other306.sessionHandle; + owner = other306.owner; + renewer = other306.renewer; } -TGetDelegationTokenReq& TGetDelegationTokenReq::operator=(const TGetDelegationTokenReq& other303) { - sessionHandle = other303.sessionHandle; - owner = other303.owner; - renewer = other303.renewer; +TGetDelegationTokenReq& TGetDelegationTokenReq::operator=(const TGetDelegationTokenReq& other307) { + sessionHandle = other307.sessionHandle; + owner = other307.owner; + renewer = other307.renewer; return *this; } void TGetDelegationTokenReq::printTo(std::ostream& out) const { @@ -9885,15 +10059,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& other308) { + status = other308.status; + delegationToken = other308.delegationToken; + __isset = other308.__isset; } -TGetDelegationTokenResp& TGetDelegationTokenResp::operator=(const TGetDelegationTokenResp& other305) { - status = other305.status; - delegationToken = other305.delegationToken; - __isset = other305.__isset; +TGetDelegationTokenResp& TGetDelegationTokenResp::operator=(const TGetDelegationTokenResp& other309) { + status = other309.status; + delegationToken = other309.delegationToken; + __isset = other309.__isset; return *this; } void TGetDelegationTokenResp::printTo(std::ostream& out) const { @@ -9996,13 +10170,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& other310) { + sessionHandle = other310.sessionHandle; + delegationToken = other310.delegationToken; } -TCancelDelegationTokenReq& TCancelDelegationTokenReq::operator=(const TCancelDelegationTokenReq& other307) { - sessionHandle = other307.sessionHandle; - delegationToken = other307.delegationToken; +TCancelDelegationTokenReq& TCancelDelegationTokenReq::operator=(const TCancelDelegationTokenReq& other311) { + sessionHandle = other311.sessionHandle; + delegationToken = other311.delegationToken; return *this; } void TCancelDelegationTokenReq::printTo(std::ostream& out) const { @@ -10085,11 +10259,11 @@ void swap(TCancelDelegationTokenResp &a, TCancelDelegationTokenResp &b) { swap(a.status, b.status); } -TCancelDelegationTokenResp::TCancelDelegationTokenResp(const TCancelDelegationTokenResp& other308) { - status = other308.status; +TCancelDelegationTokenResp::TCancelDelegationTokenResp(const TCancelDelegationTokenResp& other312) { + status = other312.status; } -TCancelDelegationTokenResp& TCancelDelegationTokenResp::operator=(const TCancelDelegationTokenResp& other309) { - status = other309.status; +TCancelDelegationTokenResp& TCancelDelegationTokenResp::operator=(const TCancelDelegationTokenResp& other313) { + status = other313.status; return *this; } void TCancelDelegationTokenResp::printTo(std::ostream& out) const { @@ -10191,13 +10365,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& other314) { + sessionHandle = other314.sessionHandle; + delegationToken = other314.delegationToken; } -TRenewDelegationTokenReq& TRenewDelegationTokenReq::operator=(const TRenewDelegationTokenReq& other311) { - sessionHandle = other311.sessionHandle; - delegationToken = other311.delegationToken; +TRenewDelegationTokenReq& TRenewDelegationTokenReq::operator=(const TRenewDelegationTokenReq& other315) { + sessionHandle = other315.sessionHandle; + delegationToken = other315.delegationToken; return *this; } void TRenewDelegationTokenReq::printTo(std::ostream& out) const { @@ -10280,11 +10454,11 @@ void swap(TRenewDelegationTokenResp &a, TRenewDelegationTokenResp &b) { swap(a.status, b.status); } -TRenewDelegationTokenResp::TRenewDelegationTokenResp(const TRenewDelegationTokenResp& other312) { - status = other312.status; +TRenewDelegationTokenResp::TRenewDelegationTokenResp(const TRenewDelegationTokenResp& other316) { + status = other316.status; } -TRenewDelegationTokenResp& TRenewDelegationTokenResp::operator=(const TRenewDelegationTokenResp& other313) { - status = other313.status; +TRenewDelegationTokenResp& TRenewDelegationTokenResp::operator=(const TRenewDelegationTokenResp& other317) { + status = other317.status; return *this; } void TRenewDelegationTokenResp::printTo(std::ostream& out) const { @@ -10354,14 +10528,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 _size318; + ::apache::thrift::protocol::TType _etype321; + xfer += iprot->readListBegin(_etype321, _size318); + this->headerNames.resize(_size318); + uint32_t _i322; + for (_i322 = 0; _i322 < _size318; ++_i322) { - xfer += iprot->readString(this->headerNames[_i318]); + xfer += iprot->readString(this->headerNames[_i322]); } xfer += iprot->readListEnd(); } @@ -10374,23 +10548,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 _size323; + ::apache::thrift::protocol::TType _etype326; + xfer += iprot->readListBegin(_etype326, _size323); + this->rows.resize(_size323); + uint32_t _i327; + for (_i327 = 0; _i327 < _size323; ++_i327) { { - 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[_i327].clear(); + uint32_t _size328; + ::apache::thrift::protocol::TType _etype331; + xfer += iprot->readListBegin(_etype331, _size328); + this->rows[_i327].resize(_size328); + uint32_t _i332; + for (_i332 = 0; _i332 < _size328; ++_i332) { - xfer += iprot->readString(this->rows[_i323][_i328]); + xfer += iprot->readString(this->rows[_i327][_i332]); } xfer += iprot->readListEnd(); } @@ -10412,9 +10586,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 ecast333; + xfer += iprot->readI32(ecast333); + this->status = (TJobExecutionStatus::type)ecast333; isset_status = true; } else { xfer += iprot->skip(ftype); @@ -10468,10 +10642,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 _iter334; + for (_iter334 = this->headerNames.begin(); _iter334 != this->headerNames.end(); ++_iter334) { - xfer += oprot->writeString((*_iter330)); + xfer += oprot->writeString((*_iter334)); } xfer += oprot->writeListEnd(); } @@ -10480,15 +10654,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 _iter335; + for (_iter335 = this->rows.begin(); _iter335 != this->rows.end(); ++_iter335) { { - 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((*_iter335).size())); + std::vector ::const_iterator _iter336; + for (_iter336 = (*_iter335).begin(); _iter336 != (*_iter335).end(); ++_iter336) { - xfer += oprot->writeString((*_iter332)); + xfer += oprot->writeString((*_iter336)); } xfer += oprot->writeListEnd(); } @@ -10528,21 +10702,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& other337) { + headerNames = other337.headerNames; + rows = other337.rows; + progressedPercentage = other337.progressedPercentage; + status = other337.status; + footerSummary = other337.footerSummary; + startTime = other337.startTime; +} +TProgressUpdateResp& TProgressUpdateResp::operator=(const TProgressUpdateResp& other338) { + headerNames = other338.headerNames; + rows = other338.rows; + progressedPercentage = other338.progressedPercentage; + status = other338.status; + footerSummary = other338.footerSummary; + startTime = other338.startTime; return *this; } void TProgressUpdateResp::printTo(std::ostream& out) const { @@ -10629,11 +10803,11 @@ void swap(TGetQueryIdReq &a, TGetQueryIdReq &b) { swap(a.operationHandle, b.operationHandle); } -TGetQueryIdReq::TGetQueryIdReq(const TGetQueryIdReq& other335) { - operationHandle = other335.operationHandle; +TGetQueryIdReq::TGetQueryIdReq(const TGetQueryIdReq& other339) { + operationHandle = other339.operationHandle; } -TGetQueryIdReq& TGetQueryIdReq::operator=(const TGetQueryIdReq& other336) { - operationHandle = other336.operationHandle; +TGetQueryIdReq& TGetQueryIdReq::operator=(const TGetQueryIdReq& other340) { + operationHandle = other340.operationHandle; return *this; } void TGetQueryIdReq::printTo(std::ostream& out) const { @@ -10715,11 +10889,11 @@ void swap(TGetQueryIdResp &a, TGetQueryIdResp &b) { swap(a.queryId, b.queryId); } -TGetQueryIdResp::TGetQueryIdResp(const TGetQueryIdResp& other337) { - queryId = other337.queryId; +TGetQueryIdResp::TGetQueryIdResp(const TGetQueryIdResp& other341) { + queryId = other341.queryId; } -TGetQueryIdResp& TGetQueryIdResp::operator=(const TGetQueryIdResp& other338) { - queryId = other338.queryId; +TGetQueryIdResp& TGetQueryIdResp::operator=(const TGetQueryIdResp& other342) { + queryId = other342.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..20d11b6e09 100644 --- service-rpc/src/gen/thrift/gen-cpp/TCLIService_types.h +++ service-rpc/src/gen/thrift/gen-cpp/TCLIService_types.h @@ -269,6 +269,10 @@ class TOperationHandle; class TOpenSessionReq; +class TRequiredReq; + +class TOptionalReq; + class TOpenSessionResp; class TSetClientInfoReq; @@ -2142,10 +2146,8 @@ 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; - bool configuration :1; + _TOpenSessionReq__isset() : optionalReq(false) {} + bool optionalReq :1; } _TOpenSessionReq__isset; class TOpenSessionReq { @@ -2153,20 +2155,112 @@ class TOpenSessionReq { TOpenSessionReq(const TOpenSessionReq&); TOpenSessionReq& operator=(const TOpenSessionReq&); - TOpenSessionReq() : client_protocol((TProtocolVersion::type)9), username(), password() { + TOpenSessionReq() { + } + + virtual ~TOpenSessionReq() throw(); + TRequiredReq requiredReq; + TOptionalReq optionalReq; + + _TOpenSessionReq__isset __isset; + + void __set_requiredReq(const TRequiredReq& val); + + void __set_optionalReq(const TOptionalReq& val); + + bool operator == (const TOpenSessionReq & rhs) const + { + if (!(requiredReq == rhs.requiredReq)) + return false; + if (__isset.optionalReq != rhs.__isset.optionalReq) + return false; + else if (__isset.optionalReq && !(optionalReq == rhs.optionalReq)) + return false; + return true; + } + bool operator != (const TOpenSessionReq &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TOpenSessionReq & ) 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(TOpenSessionReq &a, TOpenSessionReq &b); + +inline std::ostream& operator<<(std::ostream& out, const TOpenSessionReq& obj) +{ + obj.printTo(out); + return out; +} + + +class TRequiredReq { + public: + + TRequiredReq(const TRequiredReq&); + TRequiredReq& operator=(const TRequiredReq&); + TRequiredReq() : client_protocol((TProtocolVersion::type)9) { client_protocol = (TProtocolVersion::type)9; } - virtual ~TOpenSessionReq() throw(); + virtual ~TRequiredReq() throw(); TProtocolVersion::type client_protocol; + + void __set_client_protocol(const TProtocolVersion::type val); + + bool operator == (const TRequiredReq & rhs) const + { + if (!(client_protocol == rhs.client_protocol)) + return false; + return true; + } + bool operator != (const TRequiredReq &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TRequiredReq & ) 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(TRequiredReq &a, TRequiredReq &b); + +inline std::ostream& operator<<(std::ostream& out, const TRequiredReq& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _TOptionalReq__isset { + _TOptionalReq__isset() : username(false), password(false), configuration(false) {} + bool username :1; + bool password :1; + bool configuration :1; +} _TOptionalReq__isset; + +class TOptionalReq { + public: + + TOptionalReq(const TOptionalReq&); + TOptionalReq& operator=(const TOptionalReq&); + TOptionalReq() : username(), password() { + } + + virtual ~TOptionalReq() throw(); std::string username; std::string password; std::map configuration; - _TOpenSessionReq__isset __isset; - - void __set_client_protocol(const TProtocolVersion::type val); + _TOptionalReq__isset __isset; void __set_username(const std::string& val); @@ -2174,10 +2268,8 @@ class TOpenSessionReq { void __set_configuration(const std::map & val); - bool operator == (const TOpenSessionReq & rhs) const + bool operator == (const TOptionalReq & 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)) @@ -2192,11 +2284,11 @@ class TOpenSessionReq { return false; return true; } - bool operator != (const TOpenSessionReq &rhs) const { + bool operator != (const TOptionalReq &rhs) const { return !(*this == rhs); } - bool operator < (const TOpenSessionReq & ) const; + bool operator < (const TOptionalReq & ) const; uint32_t read(::apache::thrift::protocol::TProtocol* iprot); uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; @@ -2204,9 +2296,9 @@ class TOpenSessionReq { virtual void printTo(std::ostream& out) const; }; -void swap(TOpenSessionReq &a, TOpenSessionReq &b); +void swap(TOptionalReq &a, TOptionalReq &b); -inline std::ostream& operator<<(std::ostream& out, const TOpenSessionReq& obj) +inline std::ostream& operator<<(std::ostream& out, const TOptionalReq& obj) { obj.printTo(out); return out; 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..34247959fe 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 @@ -38,10 +38,8 @@ @org.apache.hadoop.hive.common.classification.InterfaceAudience.Public @org.apache.hadoop.hive.common.classification.InterfaceStability.Stable public class TOpenSessionReq 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("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 REQUIRED_REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("requiredReq", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField OPTIONAL_REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("optionalReq", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -49,21 +47,13 @@ schemes.put(TupleScheme.class, new TOpenSessionReqTupleSchemeFactory()); } - private TProtocolVersion client_protocol; // required - private String username; // optional - private String password; // optional - private Map configuration; // optional + private TRequiredReq requiredReq; // required + private TOptionalReq optionalReq; // 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 { - /** - * - * @see TProtocolVersion - */ - CLIENT_PROTOCOL((short)1, "client_protocol"), - USERNAME((short)2, "username"), - PASSWORD((short)3, "password"), - CONFIGURATION((short)4, "configuration"); + REQUIRED_REQ((short)1, "requiredReq"), + OPTIONAL_REQ((short)2, "optionalReq"); private static final Map byName = new HashMap(); @@ -78,14 +68,10 @@ */ 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 - return CONFIGURATION; + case 1: // REQUIRED_REQ + return REQUIRED_REQ; + case 2: // OPTIONAL_REQ + return OPTIONAL_REQ; default: return null; } @@ -126,52 +112,37 @@ public String getFieldName() { } // isset id assignments - private static final _Fields optionals[] = {_Fields.USERNAME,_Fields.PASSWORD,_Fields.CONFIGURATION}; + private static final _Fields optionals[] = {_Fields.OPTIONAL_REQ}; 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), - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.REQUIRED_REQ, new org.apache.thrift.meta_data.FieldMetaData("requiredReq", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT , "TRequiredReq"))); + tmpMap.put(_Fields.OPTIONAL_REQ, new org.apache.thrift.meta_data.FieldMetaData("optionalReq", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT , "TOptionalReq"))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TOpenSessionReq.class, metaDataMap); } public TOpenSessionReq() { - this.client_protocol = org.apache.hive.service.rpc.thrift.TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V10; - } public TOpenSessionReq( - TProtocolVersion client_protocol) + TRequiredReq requiredReq) { this(); - this.client_protocol = client_protocol; + this.requiredReq = requiredReq; } /** * Performs a deep copy on other. */ public TOpenSessionReq(TOpenSessionReq other) { - if (other.isSetClient_protocol()) { - this.client_protocol = other.client_protocol; - } - if (other.isSetUsername()) { - this.username = other.username; + if (other.isSetRequiredReq()) { + this.requiredReq = other.requiredReq; } - if (other.isSetPassword()) { - this.password = other.password; - } - if (other.isSetConfiguration()) { - Map __this__configuration = new HashMap(other.configuration); - this.configuration = __this__configuration; + if (other.isSetOptionalReq()) { + this.optionalReq = other.optionalReq; } } @@ -181,155 +152,71 @@ public TOpenSessionReq deepCopy() { @Override 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; - } - - /** - * - * @see TProtocolVersion - */ - public TProtocolVersion getClient_protocol() { - return this.client_protocol; - } - - /** - * - * @see TProtocolVersion - */ - public void setClient_protocol(TProtocolVersion client_protocol) { - this.client_protocol = client_protocol; + this.requiredReq = null; + this.optionalReq = null; } - public void unsetClient_protocol() { - this.client_protocol = null; + public TRequiredReq getRequiredReq() { + return this.requiredReq; } - /** Returns true if field client_protocol is set (has been assigned a value) and false otherwise */ - public boolean isSetClient_protocol() { - return this.client_protocol != null; + public void setRequiredReq(TRequiredReq requiredReq) { + this.requiredReq = requiredReq; } - public void setClient_protocolIsSet(boolean value) { - if (!value) { - this.client_protocol = null; - } - } - - public String getUsername() { - return this.username; - } - - public void setUsername(String username) { - this.username = username; - } - - public void unsetUsername() { - this.username = null; + public void unsetRequiredReq() { + this.requiredReq = null; } - /** Returns true if field username is set (has been assigned a value) and false otherwise */ - public boolean isSetUsername() { - return this.username != null; + /** Returns true if field requiredReq is set (has been assigned a value) and false otherwise */ + public boolean isSetRequiredReq() { + return this.requiredReq != null; } - public void setUsernameIsSet(boolean value) { + public void setRequiredReqIsSet(boolean value) { if (!value) { - this.username = null; + this.requiredReq = null; } } - public String getPassword() { - return this.password; + public TOptionalReq getOptionalReq() { + return this.optionalReq; } - public void setPassword(String password) { - this.password = password; + public void setOptionalReq(TOptionalReq optionalReq) { + this.optionalReq = optionalReq; } - public void unsetPassword() { - this.password = null; + public void unsetOptionalReq() { + this.optionalReq = null; } - /** Returns true if field password is set (has been assigned a value) and false otherwise */ - public boolean isSetPassword() { - return this.password != null; + /** Returns true if field optionalReq is set (has been assigned a value) and false otherwise */ + public boolean isSetOptionalReq() { + return this.optionalReq != null; } - public void setPasswordIsSet(boolean value) { + public void setOptionalReqIsSet(boolean value) { if (!value) { - this.password = null; - } - } - - public int getConfigurationSize() { - return (this.configuration == null) ? 0 : this.configuration.size(); - } - - public void putToConfiguration(String key, String val) { - if (this.configuration == null) { - this.configuration = new HashMap(); - } - this.configuration.put(key, val); - } - - public Map getConfiguration() { - return this.configuration; - } - - public void setConfiguration(Map configuration) { - this.configuration = configuration; - } - - public void unsetConfiguration() { - this.configuration = null; - } - - /** Returns true if field configuration is set (has been assigned a value) and false otherwise */ - public boolean isSetConfiguration() { - return this.configuration != null; - } - - public void setConfigurationIsSet(boolean value) { - if (!value) { - this.configuration = null; + this.optionalReq = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case CLIENT_PROTOCOL: + case REQUIRED_REQ: if (value == null) { - unsetClient_protocol(); + unsetRequiredReq(); } else { - setClient_protocol((TProtocolVersion)value); + setRequiredReq((TRequiredReq)value); } break; - case USERNAME: + case OPTIONAL_REQ: if (value == null) { - unsetUsername(); + unsetOptionalReq(); } else { - setUsername((String)value); - } - break; - - case PASSWORD: - if (value == null) { - unsetPassword(); - } else { - setPassword((String)value); - } - break; - - case CONFIGURATION: - if (value == null) { - unsetConfiguration(); - } else { - setConfiguration((Map)value); + setOptionalReq((TOptionalReq)value); } break; @@ -338,17 +225,11 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case CLIENT_PROTOCOL: - return getClient_protocol(); + case REQUIRED_REQ: + return getRequiredReq(); - case USERNAME: - return getUsername(); - - case PASSWORD: - return getPassword(); - - case CONFIGURATION: - return getConfiguration(); + case OPTIONAL_REQ: + return getOptionalReq(); } throw new IllegalStateException(); @@ -361,14 +242,10 @@ 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(); + case REQUIRED_REQ: + return isSetRequiredReq(); + case OPTIONAL_REQ: + return isSetOptionalReq(); } throw new IllegalStateException(); } @@ -386,39 +263,21 @@ public boolean equals(TOpenSessionReq that) { if (that == null) return false; - boolean this_present_client_protocol = true && this.isSetClient_protocol(); - boolean that_present_client_protocol = true && that.isSetClient_protocol(); - if (this_present_client_protocol || that_present_client_protocol) { - if (!(this_present_client_protocol && that_present_client_protocol)) - return false; - if (!this.client_protocol.equals(that.client_protocol)) - 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)) + boolean this_present_requiredReq = true && this.isSetRequiredReq(); + boolean that_present_requiredReq = true && that.isSetRequiredReq(); + if (this_present_requiredReq || that_present_requiredReq) { + if (!(this_present_requiredReq && that_present_requiredReq)) return false; - if (!this.username.equals(that.username)) + if (!this.requiredReq.equals(that.requiredReq)) 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)) + boolean this_present_optionalReq = true && this.isSetOptionalReq(); + boolean that_present_optionalReq = true && that.isSetOptionalReq(); + if (this_present_optionalReq || that_present_optionalReq) { + if (!(this_present_optionalReq && that_present_optionalReq)) 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) { - if (!(this_present_configuration && that_present_configuration)) - return false; - if (!this.configuration.equals(that.configuration)) + if (!this.optionalReq.equals(that.optionalReq)) return false; } @@ -429,25 +288,15 @@ public boolean equals(TOpenSessionReq that) { public int hashCode() { List list = new ArrayList(); - boolean present_client_protocol = true && (isSetClient_protocol()); - list.add(present_client_protocol); - if (present_client_protocol) - list.add(client_protocol.getValue()); + boolean present_requiredReq = true && (isSetRequiredReq()); + list.add(present_requiredReq); + if (present_requiredReq) + list.add(requiredReq); - 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) - list.add(configuration); + boolean present_optionalReq = true && (isSetOptionalReq()); + list.add(present_optionalReq); + if (present_optionalReq) + list.add(optionalReq); return list.hashCode(); } @@ -460,42 +309,22 @@ public int compareTo(TOpenSessionReq other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetClient_protocol()).compareTo(other.isSetClient_protocol()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetClient_protocol()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.client_protocol, other.client_protocol); - if (lastComparison != 0) { - 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()); + lastComparison = Boolean.valueOf(isSetRequiredReq()).compareTo(other.isSetRequiredReq()); if (lastComparison != 0) { return lastComparison; } - if (isSetPassword()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.password, other.password); + if (isSetRequiredReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.requiredReq, other.requiredReq); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetConfiguration()).compareTo(other.isSetConfiguration()); + lastComparison = Boolean.valueOf(isSetOptionalReq()).compareTo(other.isSetOptionalReq()); if (lastComparison != 0) { return lastComparison; } - if (isSetConfiguration()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.configuration, other.configuration); + if (isSetOptionalReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.optionalReq, other.optionalReq); if (lastComparison != 0) { return lastComparison; } @@ -520,40 +349,20 @@ public String toString() { StringBuilder sb = new StringBuilder("TOpenSessionReq("); boolean first = true; - sb.append("client_protocol:"); - if (this.client_protocol == null) { + sb.append("requiredReq:"); + if (this.requiredReq == null) { sb.append("null"); } else { - sb.append(this.client_protocol); + sb.append(this.requiredReq); } 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 (isSetOptionalReq()) { if (!first) sb.append(", "); - sb.append("password:"); - if (this.password == null) { + sb.append("optionalReq:"); + if (this.optionalReq == null) { sb.append("null"); } else { - sb.append(this.password); - } - first = false; - } - if (isSetConfiguration()) { - if (!first) sb.append(", "); - sb.append("configuration:"); - if (this.configuration == null) { - sb.append("null"); - } else { - sb.append(this.configuration); + sb.append(this.optionalReq); } first = false; } @@ -563,8 +372,8 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields - if (!isSetClient_protocol()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'client_protocol' is unset! Struct:" + toString()); + if (!isSetRequiredReq()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'requiredReq' is unset! Struct:" + toString()); } // check for sub-struct validity @@ -604,46 +413,20 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TOpenSessionReq str break; } switch (schemeField.id) { - case 1: // CLIENT_PROTOCOL - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.client_protocol = org.apache.hive.service.rpc.thrift.TProtocolVersion.findByValue(iprot.readI32()); - struct.setClient_protocolIsSet(true); - } else { - 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); + case 1: // REQUIRED_REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.requiredReq = new TRequiredReq(); + struct.requiredReq.read(iprot); + struct.setRequiredReqIsSet(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 - if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map142 = iprot.readMapBegin(); - struct.configuration = new HashMap(2*_map142.size); - String _key143; - String _val144; - for (int _i145 = 0; _i145 < _map142.size; ++_i145) - { - _key143 = iprot.readString(); - _val144 = iprot.readString(); - struct.configuration.put(_key143, _val144); - } - iprot.readMapEnd(); - } - struct.setConfigurationIsSet(true); + case 2: // OPTIONAL_REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.optionalReq = new TOptionalReq(); + struct.optionalReq.read(iprot); + struct.setOptionalReqIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -661,37 +444,15 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TOpenSessionReq st struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.client_protocol != null) { - oprot.writeFieldBegin(CLIENT_PROTOCOL_FIELD_DESC); - oprot.writeI32(struct.client_protocol.getValue()); + if (struct.requiredReq != null) { + oprot.writeFieldBegin(REQUIRED_REQ_FIELD_DESC); + struct.requiredReq.write(oprot); 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); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.configuration.size())); - for (Map.Entry _iter146 : struct.configuration.entrySet()) - { - oprot.writeString(_iter146.getKey()); - oprot.writeString(_iter146.getValue()); - } - oprot.writeMapEnd(); - } + if (struct.optionalReq != null) { + if (struct.isSetOptionalReq()) { + oprot.writeFieldBegin(OPTIONAL_REQ_FIELD_DESC); + struct.optionalReq.write(oprot); oprot.writeFieldEnd(); } } @@ -712,64 +473,28 @@ public TOpenSessionReqTupleScheme getScheme() { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TOpenSessionReq struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeI32(struct.client_protocol.getValue()); + struct.requiredReq.write(oprot); BitSet optionals = new BitSet(); - if (struct.isSetUsername()) { + if (struct.isSetOptionalReq()) { 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); - } - if (struct.isSetConfiguration()) { - { - oprot.writeI32(struct.configuration.size()); - for (Map.Entry _iter147 : struct.configuration.entrySet()) - { - oprot.writeString(_iter147.getKey()); - oprot.writeString(_iter147.getValue()); - } - } + oprot.writeBitSet(optionals, 1); + if (struct.isSetOptionalReq()) { + struct.optionalReq.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, TOpenSessionReq struct) throws org.apache.thrift.TException { 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); + struct.requiredReq = new TRequiredReq(); + struct.requiredReq.read(iprot); + struct.setRequiredReqIsSet(true); + 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); - String _key149; - String _val150; - for (int _i151 = 0; _i151 < _map148.size; ++_i151) - { - _key149 = iprot.readString(); - _val150 = iprot.readString(); - struct.configuration.put(_key149, _val150); - } - } - struct.setConfigurationIsSet(true); + struct.optionalReq = new TOptionalReq(); + struct.optionalReq.read(iprot); + struct.setOptionalReqIsSet(true); } } } diff --git service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TOptionalReq.java service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TOptionalReq.java new file mode 100644 index 0000000000..695f9edd87 --- /dev/null +++ service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TOptionalReq.java @@ -0,0 +1,657 @@ +/** + * 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 TOptionalReq 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("TOptionalReq"); + + 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 org.apache.thrift.protocol.TField CONFIGURATION_FIELD_DESC = new org.apache.thrift.protocol.TField("configuration", org.apache.thrift.protocol.TType.MAP, (short)3); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new TOptionalReqStandardSchemeFactory()); + schemes.put(TupleScheme.class, new TOptionalReqTupleSchemeFactory()); + } + + 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. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + USERNAME((short)1, "username"), + PASSWORD((short)2, "password"), + CONFIGURATION((short)3, "configuration"); + + 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; + case 3: // CONFIGURATION + return CONFIGURATION; + 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,_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.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), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TOptionalReq.class, metaDataMap); + } + + public TOptionalReq() { + } + + /** + * Performs a deep copy on other. + */ + public TOptionalReq(TOptionalReq other) { + 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; + } + } + + public TOptionalReq deepCopy() { + return new TOptionalReq(this); + } + + @Override + public void clear() { + this.username = null; + this.password = null; + this.configuration = 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 int getConfigurationSize() { + return (this.configuration == null) ? 0 : this.configuration.size(); + } + + public void putToConfiguration(String key, String val) { + if (this.configuration == null) { + this.configuration = new HashMap(); + } + this.configuration.put(key, val); + } + + public Map getConfiguration() { + return this.configuration; + } + + public void setConfiguration(Map configuration) { + this.configuration = configuration; + } + + public void unsetConfiguration() { + this.configuration = null; + } + + /** Returns true if field configuration is set (has been assigned a value) and false otherwise */ + public boolean isSetConfiguration() { + return this.configuration != null; + } + + public void setConfigurationIsSet(boolean value) { + if (!value) { + this.configuration = 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; + + case CONFIGURATION: + if (value == null) { + unsetConfiguration(); + } else { + setConfiguration((Map)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case USERNAME: + return getUsername(); + + case PASSWORD: + return getPassword(); + + case CONFIGURATION: + return getConfiguration(); + + } + 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(); + case CONFIGURATION: + return isSetConfiguration(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof TOptionalReq) + return this.equals((TOptionalReq)that); + return false; + } + + public boolean equals(TOptionalReq 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; + } + + boolean this_present_configuration = true && this.isSetConfiguration(); + boolean that_present_configuration = true && that.isSetConfiguration(); + if (this_present_configuration || that_present_configuration) { + if (!(this_present_configuration && that_present_configuration)) + return false; + if (!this.configuration.equals(that.configuration)) + 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); + + boolean present_configuration = true && (isSetConfiguration()); + list.add(present_configuration); + if (present_configuration) + list.add(configuration); + + return list.hashCode(); + } + + @Override + public int compareTo(TOptionalReq 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; + } + } + lastComparison = Boolean.valueOf(isSetConfiguration()).compareTo(other.isSetConfiguration()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetConfiguration()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.configuration, other.configuration); + 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("TOptionalReq("); + 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; + } + if (isSetConfiguration()) { + if (!first) sb.append(", "); + sb.append("configuration:"); + if (this.configuration == null) { + sb.append("null"); + } else { + sb.append(this.configuration); + } + 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 TOptionalReqStandardSchemeFactory implements SchemeFactory { + public TOptionalReqStandardScheme getScheme() { + return new TOptionalReqStandardScheme(); + } + } + + private static class TOptionalReqStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, TOptionalReq 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; + case 3: // CONFIGURATION + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map142 = iprot.readMapBegin(); + struct.configuration = new HashMap(2*_map142.size); + String _key143; + String _val144; + for (int _i145 = 0; _i145 < _map142.size; ++_i145) + { + _key143 = iprot.readString(); + _val144 = iprot.readString(); + struct.configuration.put(_key143, _val144); + } + iprot.readMapEnd(); + } + struct.setConfigurationIsSet(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, TOptionalReq 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(); + } + } + if (struct.configuration != null) { + if (struct.isSetConfiguration()) { + oprot.writeFieldBegin(CONFIGURATION_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.configuration.size())); + for (Map.Entry _iter146 : struct.configuration.entrySet()) + { + oprot.writeString(_iter146.getKey()); + oprot.writeString(_iter146.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TOptionalReqTupleSchemeFactory implements SchemeFactory { + public TOptionalReqTupleScheme getScheme() { + return new TOptionalReqTupleScheme(); + } + } + + private static class TOptionalReqTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TOptionalReq 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); + } + if (struct.isSetConfiguration()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetUsername()) { + oprot.writeString(struct.username); + } + if (struct.isSetPassword()) { + oprot.writeString(struct.password); + } + if (struct.isSetConfiguration()) { + { + oprot.writeI32(struct.configuration.size()); + for (Map.Entry _iter147 : struct.configuration.entrySet()) + { + oprot.writeString(_iter147.getKey()); + oprot.writeString(_iter147.getValue()); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TOptionalReq struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + 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); + String _key149; + String _val150; + for (int _i151 = 0; _i151 < _map148.size; ++_i151) + { + _key149 = iprot.readString(); + _val150 = iprot.readString(); + struct.configuration.put(_key149, _val150); + } + } + struct.setConfigurationIsSet(true); + } + } + } + +} + diff --git service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TRequiredReq.java service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TRequiredReq.java new file mode 100644 index 0000000000..f1eaea49b3 --- /dev/null +++ service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TRequiredReq.java @@ -0,0 +1,404 @@ +/** + * 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 TRequiredReq 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("TRequiredReq"); + + 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new TRequiredReqStandardSchemeFactory()); + schemes.put(TupleScheme.class, new TRequiredReqTupleSchemeFactory()); + } + + private TProtocolVersion client_protocol; // 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 { + /** + * + * @see TProtocolVersion + */ + CLIENT_PROTOCOL((short)1, "client_protocol"); + + 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: // CLIENT_PROTOCOL + return CLIENT_PROTOCOL; + 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 + 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))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TRequiredReq.class, metaDataMap); + } + + public TRequiredReq() { + this.client_protocol = org.apache.hive.service.rpc.thrift.TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V10; + + } + + public TRequiredReq( + TProtocolVersion client_protocol) + { + this(); + this.client_protocol = client_protocol; + } + + /** + * Performs a deep copy on other. + */ + public TRequiredReq(TRequiredReq other) { + if (other.isSetClient_protocol()) { + this.client_protocol = other.client_protocol; + } + } + + public TRequiredReq deepCopy() { + return new TRequiredReq(this); + } + + @Override + public void clear() { + this.client_protocol = org.apache.hive.service.rpc.thrift.TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V10; + + } + + /** + * + * @see TProtocolVersion + */ + public TProtocolVersion getClient_protocol() { + return this.client_protocol; + } + + /** + * + * @see TProtocolVersion + */ + public void setClient_protocol(TProtocolVersion client_protocol) { + this.client_protocol = client_protocol; + } + + public void unsetClient_protocol() { + this.client_protocol = null; + } + + /** Returns true if field client_protocol is set (has been assigned a value) and false otherwise */ + public boolean isSetClient_protocol() { + return this.client_protocol != null; + } + + public void setClient_protocolIsSet(boolean value) { + if (!value) { + this.client_protocol = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case CLIENT_PROTOCOL: + if (value == null) { + unsetClient_protocol(); + } else { + setClient_protocol((TProtocolVersion)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case CLIENT_PROTOCOL: + return getClient_protocol(); + + } + 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 CLIENT_PROTOCOL: + return isSetClient_protocol(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof TRequiredReq) + return this.equals((TRequiredReq)that); + return false; + } + + public boolean equals(TRequiredReq that) { + if (that == null) + return false; + + boolean this_present_client_protocol = true && this.isSetClient_protocol(); + boolean that_present_client_protocol = true && that.isSetClient_protocol(); + if (this_present_client_protocol || that_present_client_protocol) { + if (!(this_present_client_protocol && that_present_client_protocol)) + return false; + if (!this.client_protocol.equals(that.client_protocol)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_client_protocol = true && (isSetClient_protocol()); + list.add(present_client_protocol); + if (present_client_protocol) + list.add(client_protocol.getValue()); + + return list.hashCode(); + } + + @Override + public int compareTo(TRequiredReq other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetClient_protocol()).compareTo(other.isSetClient_protocol()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetClient_protocol()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.client_protocol, other.client_protocol); + 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("TRequiredReq("); + boolean first = true; + + sb.append("client_protocol:"); + if (this.client_protocol == null) { + sb.append("null"); + } else { + sb.append(this.client_protocol); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetClient_protocol()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'client_protocol' is unset! Struct:" + toString()); + } + + // 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 TRequiredReqStandardSchemeFactory implements SchemeFactory { + public TRequiredReqStandardScheme getScheme() { + return new TRequiredReqStandardScheme(); + } + } + + private static class TRequiredReqStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, TRequiredReq 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: // CLIENT_PROTOCOL + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.client_protocol = org.apache.hive.service.rpc.thrift.TProtocolVersion.findByValue(iprot.readI32()); + struct.setClient_protocolIsSet(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, TRequiredReq struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.client_protocol != null) { + oprot.writeFieldBegin(CLIENT_PROTOCOL_FIELD_DESC); + oprot.writeI32(struct.client_protocol.getValue()); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TRequiredReqTupleSchemeFactory implements SchemeFactory { + public TRequiredReqTupleScheme getScheme() { + return new TRequiredReqTupleScheme(); + } + } + + private static class TRequiredReqTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TRequiredReq struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeI32(struct.client_protocol.getValue()); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TRequiredReq struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.client_protocol = org.apache.hive.service.rpc.thrift.TProtocolVersion.findByValue(iprot.readI32()); + struct.setClient_protocolIsSet(true); + } + } + +} + diff --git service-rpc/src/gen/thrift/gen-php/Types.php service-rpc/src/gen/thrift/gen-php/Types.php index 39572d4f09..d24c875f0c 100644 --- service-rpc/src/gen/thrift/gen-php/Types.php +++ service-rpc/src/gen/thrift/gen-php/Types.php @@ -4526,10 +4526,189 @@ class TOperationHandle { class TOpenSessionReq { static $_TSPEC; + /** + * @var \TRequiredReq + */ + public $requiredReq = null; + /** + * @var \TOptionalReq + */ + public $optionalReq = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'requiredReq', + 'type' => TType::STRUCT, + 'class' => '\TRequiredReq', + ), + 2 => array( + 'var' => 'optionalReq', + 'type' => TType::STRUCT, + 'class' => '\TOptionalReq', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['requiredReq'])) { + $this->requiredReq = $vals['requiredReq']; + } + if (isset($vals['optionalReq'])) { + $this->optionalReq = $vals['optionalReq']; + } + } + } + + public function getName() { + return 'TOpenSessionReq'; + } + + 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::STRUCT) { + $this->requiredReq = new \TRequiredReq(); + $xfer += $this->requiredReq->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->optionalReq = new \TOptionalReq(); + $xfer += $this->optionalReq->read($input); + } 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('TOpenSessionReq'); + if ($this->requiredReq !== null) { + if (!is_object($this->requiredReq)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('requiredReq', TType::STRUCT, 1); + $xfer += $this->requiredReq->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->optionalReq !== null) { + if (!is_object($this->optionalReq)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('optionalReq', TType::STRUCT, 2); + $xfer += $this->optionalReq->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class TRequiredReq { + static $_TSPEC; + /** * @var int */ public $client_protocol = 9; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'client_protocol', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['client_protocol'])) { + $this->client_protocol = $vals['client_protocol']; + } + } + } + + public function getName() { + return 'TRequiredReq'; + } + + 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::I32) { + $xfer += $input->readI32($this->client_protocol); + } 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('TRequiredReq'); + if ($this->client_protocol !== null) { + $xfer += $output->writeFieldBegin('client_protocol', TType::I32, 1); + $xfer += $output->writeI32($this->client_protocol); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class TOptionalReq { + static $_TSPEC; + /** * @var string */ @@ -4547,18 +4726,14 @@ class TOpenSessionReq { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'client_protocol', - 'type' => TType::I32, - ), - 2 => array( 'var' => 'username', 'type' => TType::STRING, ), - 3 => array( + 2 => array( 'var' => 'password', 'type' => TType::STRING, ), - 4 => array( + 3 => array( 'var' => 'configuration', 'type' => TType::MAP, 'ktype' => TType::STRING, @@ -4573,9 +4748,6 @@ class TOpenSessionReq { ); } if (is_array($vals)) { - if (isset($vals['client_protocol'])) { - $this->client_protocol = $vals['client_protocol']; - } if (isset($vals['username'])) { $this->username = $vals['username']; } @@ -4589,7 +4761,7 @@ class TOpenSessionReq { } public function getName() { - return 'TOpenSessionReq'; + return 'TOptionalReq'; } public function read($input) @@ -4608,27 +4780,20 @@ class TOpenSessionReq { switch ($fid) { case 1: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->client_protocol); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: if ($ftype == TType::STRING) { $xfer += $input->readString($this->username); } else { $xfer += $input->skip($ftype); } break; - case 3: + case 2: if ($ftype == TType::STRING) { $xfer += $input->readString($this->password); } else { $xfer += $input->skip($ftype); } break; - case 4: + case 3: if ($ftype == TType::MAP) { $this->configuration = array(); $_size125 = 0; @@ -4660,19 +4825,14 @@ class TOpenSessionReq { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('TOpenSessionReq'); - if ($this->client_protocol !== null) { - $xfer += $output->writeFieldBegin('client_protocol', TType::I32, 1); - $xfer += $output->writeI32($this->client_protocol); - $xfer += $output->writeFieldEnd(); - } + $xfer += $output->writeStructBegin('TOptionalReq'); if ($this->username !== null) { - $xfer += $output->writeFieldBegin('username', TType::STRING, 2); + $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, 3); + $xfer += $output->writeFieldBegin('password', TType::STRING, 2); $xfer += $output->writeString($this->password); $xfer += $output->writeFieldEnd(); } @@ -4680,7 +4840,7 @@ class TOpenSessionReq { 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, 3); { $output->writeMapBegin(TType::STRING, TType::STRING, count($this->configuration)); { diff --git service-rpc/src/gen/thrift/gen-py/TCLIService/ttypes.py service-rpc/src/gen/thrift/gen-py/TCLIService/ttypes.py index 989ba4456f..04d5e46a08 100644 --- service-rpc/src/gen/thrift/gen-py/TCLIService/ttypes.py +++ service-rpc/src/gen/thrift/gen-py/TCLIService/ttypes.py @@ -3522,27 +3522,100 @@ def __ne__(self, other): return not (self == other) class TOpenSessionReq: + """ + Attributes: + - requiredReq + - optionalReq + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'requiredReq', (TRequiredReq, TRequiredReq.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'optionalReq', (TOptionalReq, TOptionalReq.thrift_spec), None, ), # 2 + ) + + def __init__(self, requiredReq=None, optionalReq=None,): + self.requiredReq = requiredReq + self.optionalReq = optionalReq + + 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.STRUCT: + self.requiredReq = TRequiredReq() + self.requiredReq.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.optionalReq = TOptionalReq() + self.optionalReq.read(iprot) + 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('TOpenSessionReq') + if self.requiredReq is not None: + oprot.writeFieldBegin('requiredReq', TType.STRUCT, 1) + self.requiredReq.write(oprot) + oprot.writeFieldEnd() + if self.optionalReq is not None: + oprot.writeFieldBegin('optionalReq', TType.STRUCT, 2) + self.optionalReq.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.requiredReq is None: + raise TProtocol.TProtocolException(message='Required field requiredReq is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.requiredReq) + value = (value * 31) ^ hash(self.optionalReq) + 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 TRequiredReq: """ 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 ) - def __init__(self, client_protocol=thrift_spec[1][4], username=None, password=None, configuration=None,): + def __init__(self, client_protocol=thrift_spec[1][4],): self.client_protocol = client_protocol - self.username = username - self.password = password - self.configuration = configuration 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: @@ -3558,17 +3631,85 @@ def read(self, iprot): self.client_protocol = iprot.readI32() else: iprot.skip(ftype) - elif fid == 2: + 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('TRequiredReq') + if self.client_protocol is not None: + oprot.writeFieldBegin('client_protocol', TType.I32, 1) + oprot.writeI32(self.client_protocol) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.client_protocol is None: + raise TProtocol.TProtocolException(message='Required field client_protocol is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.client_protocol) + 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 TOptionalReq: + """ + Attributes: + - username + - password + - configuration + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'username', None, None, ), # 1 + (2, TType.STRING, 'password', None, None, ), # 2 + (3, TType.MAP, 'configuration', (TType.STRING,None,TType.STRING,None), None, ), # 3 + ) + + def __init__(self, username=None, password=None, configuration=None,): + self.username = username + self.password = password + self.configuration = configuration + + 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 == 3: + elif fid == 2: if ftype == TType.STRING: self.password = iprot.readString() else: iprot.skip(ftype) - elif fid == 4: + elif fid == 3: if ftype == TType.MAP: self.configuration = {} (_ktype126, _vtype127, _size125 ) = iprot.readMapBegin() @@ -3588,21 +3729,17 @@ 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('TOpenSessionReq') - if self.client_protocol is not None: - oprot.writeFieldBegin('client_protocol', TType.I32, 1) - oprot.writeI32(self.client_protocol) - oprot.writeFieldEnd() + oprot.writeStructBegin('TOptionalReq') if self.username is not None: - oprot.writeFieldBegin('username', TType.STRING, 2) + oprot.writeFieldBegin('username', TType.STRING, 1) oprot.writeString(self.username) oprot.writeFieldEnd() if self.password is not None: - oprot.writeFieldBegin('password', TType.STRING, 3) + oprot.writeFieldBegin('password', TType.STRING, 2) oprot.writeString(self.password) oprot.writeFieldEnd() if self.configuration is not None: - oprot.writeFieldBegin('configuration', TType.MAP, 4) + oprot.writeFieldBegin('configuration', TType.MAP, 3) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.configuration)) for kiter132,viter133 in self.configuration.items(): oprot.writeString(kiter132) @@ -3613,14 +3750,11 @@ def write(self, oprot): oprot.writeStructEnd() def validate(self): - if self.client_protocol is None: - raise TProtocol.TProtocolException(message='Required field client_protocol is unset!') return def __hash__(self): value = 17 - value = (value * 31) ^ hash(self.client_protocol) value = (value * 31) ^ hash(self.username) value = (value * 31) ^ hash(self.password) value = (value * 31) ^ hash(self.configuration) 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..1787df3f4c 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 @@ -961,17 +961,30 @@ class TOperationHandle end class TOpenSessionReq + include ::Thrift::Struct, ::Thrift::Struct_Union + REQUIREDREQ = 1 + OPTIONALREQ = 2 + + FIELDS = { + REQUIREDREQ => {:type => ::Thrift::Types::STRUCT, :name => 'requiredReq', :class => ::TRequiredReq}, + OPTIONALREQ => {:type => ::Thrift::Types::STRUCT, :name => 'optionalReq', :class => ::TOptionalReq, :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field requiredReq is unset!') unless @requiredReq + end + + ::Thrift::Struct.generate_accessors self +end + +class TRequiredReq include ::Thrift::Struct, ::Thrift::Struct_Union CLIENT_PROTOCOL = 1 - USERNAME = 2 - PASSWORD = 3 - CONFIGURATION = 4 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} + CLIENT_PROTOCOL => {:type => ::Thrift::Types::I32, :name => 'client_protocol', :default => 9, :enum_class => ::TProtocolVersion} } def struct_fields; FIELDS; end @@ -986,6 +999,26 @@ class TOpenSessionReq ::Thrift::Struct.generate_accessors self end +class TOptionalReq + include ::Thrift::Struct, ::Thrift::Struct_Union + USERNAME = 1 + PASSWORD = 2 + CONFIGURATION = 3 + + FIELDS = { + 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} + } + + 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..eecbb1281c 100644 --- service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIService.java +++ service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIService.java @@ -318,7 +318,7 @@ private TStatus unsecureTokenErrorStatus() { @Override public TOpenSessionResp OpenSession(TOpenSessionReq req) throws TException { - LOG.info("Client protocol version: " + req.getClient_protocol()); + LOG.info("Client protocol version: " + req.getRequiredReq().getClient_protocol()); TOpenSessionResp resp = new TOpenSessionResp(); try { SessionHandle sessionHandle = getSessionHandle(req, resp); @@ -425,7 +425,7 @@ private String getUserName(TOpenSessionReq req) throws HiveSQLException, IOExcep userName = SessionManager.getUserName(); } if (userName == null) { - userName = req.getUsername(); + userName = req.getOptionalReq().getUsername(); } if (cliService.getHiveConf().getBoolVar(ConfVars.HIVE_AUTHORIZATION_KERBEROS_USE_SHORTNAME)) @@ -433,7 +433,7 @@ private String getUserName(TOpenSessionReq req) throws HiveSQLException, IOExcep userName = getShortName(userName); } - String effectiveClientUser = getProxyUser(userName, req.getConfiguration(), getIpAddress()); + String effectiveClientUser = getProxyUser(userName, req.getOptionalReq().getConfiguration(), getIpAddress()); LOG.debug("Client's username: " + effectiveClientUser); return effectiveClientUser; } @@ -470,16 +470,16 @@ SessionHandle getSessionHandle(TOpenSessionReq req, TOpenSessionResp res) String userName = getUserName(req); String ipAddress = getIpAddress(); TProtocolVersion protocol = getMinVersion(CLIService.SERVER_VERSION, - req.getClient_protocol()); + req.getRequiredReq().getClient_protocol()); SessionHandle sessionHandle; if (cliService.getHiveConf().getBoolVar(ConfVars.HIVE_SERVER2_ENABLE_DOAS) && (userName != null)) { String delegationTokenStr = getDelegationToken(userName); sessionHandle = cliService.openSessionWithImpersonation(protocol, userName, - req.getPassword(), ipAddress, req.getConfiguration(), delegationTokenStr); + req.getOptionalReq().getPassword(), ipAddress, req.getOptionalReq().getConfiguration(), delegationTokenStr); } else { - sessionHandle = cliService.openSession(protocol, userName, req.getPassword(), - ipAddress, req.getConfiguration()); + sessionHandle = cliService.openSession(protocol, userName, req.getOptionalReq().getPassword(), + ipAddress, req.getOptionalReq().getConfiguration()); } res.setServerProtocolVersion(protocol); return sessionHandle; 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..d3e2445974 100644 --- service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIServiceClient.java +++ service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIServiceClient.java @@ -122,9 +122,9 @@ public SessionHandle openSession(String username, String password, throws HiveSQLException { try { TOpenSessionReq req = new TOpenSessionReq(); - req.setUsername(username); - req.setPassword(password); - req.setConfiguration(configuration); + req.getOptionalReq().setUsername(username); + req.getOptionalReq().setPassword(password); + req.getOptionalReq().setConfiguration(configuration); TOpenSessionResp resp = cliService.OpenSession(req); checkStatus(resp.getStatus()); return new SessionHandle(resp.getSessionHandle(), resp.getServerProtocolVersion());