diff --git itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestAuthorizationApiAuthorizer.java itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestAuthorizationApiAuthorizer.java index d2b6355..e65bf4d 100644 --- itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestAuthorizationApiAuthorizer.java +++ itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestAuthorizationApiAuthorizer.java @@ -123,7 +123,7 @@ public void testRevokePriv() throws Exception { FunctionInvoker invoker = new FunctionInvoker() { @Override public void invoke() throws Exception { - msc.revoke_privileges(new PrivilegeBag(new ArrayList())); + msc.revoke_privileges(new PrivilegeBag(new ArrayList()), false); } }; testFunction(invoker); diff --git metastore/if/hive_metastore.thrift metastore/if/hive_metastore.thrift index 2df4876..55f41db 100755 --- metastore/if/hive_metastore.thrift +++ metastore/if/hive_metastore.thrift @@ -139,6 +139,16 @@ struct PrincipalPrivilegeSet { 3: map> rolePrivileges, //role name -> privilege grant info } +struct GrantRevokePrivilegeRequest { + 1: GrantRevokeType requestType; + 2: PrivilegeBag privileges; + 3: optional bool revokeGrantOption; // Only for revoke request +} + +struct GrantRevokePrivilegeResponse { + 1: optional bool success; +} + struct Role { 1: string roleName, 2: i32 createTime, @@ -1001,8 +1011,11 @@ service ThriftHiveMetastore extends fb303.FacebookService list list_privileges(1:string principal_name, 2:PrincipalType principal_type, 3: HiveObjectRef hiveObject) throws(1:MetaException o1) + // Deprecated, use grant_revoke_privileges() bool grant_privileges(1:PrivilegeBag privileges) throws(1:MetaException o1) + // Deprecated, use grant_revoke_privileges() bool revoke_privileges(1:PrivilegeBag privileges) throws(1:MetaException o1) + GrantRevokePrivilegeResponse grant_revoke_privileges(1:GrantRevokePrivilegeRequest request) throws(1:MetaException o1); // this is used by metastore client to send UGI information to metastore server immediately // after setting up a connection. diff --git metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp index 6831e20..53165d0 100644 --- metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp +++ metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp @@ -736,14 +736,14 @@ uint32_t ThriftHiveMetastore_get_databases_result::read(::apache::thrift::protoc if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size362; - ::apache::thrift::protocol::TType _etype365; - xfer += iprot->readListBegin(_etype365, _size362); - this->success.resize(_size362); - uint32_t _i366; - for (_i366 = 0; _i366 < _size362; ++_i366) + uint32_t _size363; + ::apache::thrift::protocol::TType _etype366; + xfer += iprot->readListBegin(_etype366, _size363); + this->success.resize(_size363); + uint32_t _i367; + for (_i367 = 0; _i367 < _size363; ++_i367) { - xfer += iprot->readString(this->success[_i366]); + xfer += iprot->readString(this->success[_i367]); } xfer += iprot->readListEnd(); } @@ -782,10 +782,10 @@ uint32_t ThriftHiveMetastore_get_databases_result::write(::apache::thrift::proto xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); - std::vector ::const_iterator _iter367; - for (_iter367 = this->success.begin(); _iter367 != this->success.end(); ++_iter367) + std::vector ::const_iterator _iter368; + for (_iter368 = this->success.begin(); _iter368 != this->success.end(); ++_iter368) { - xfer += oprot->writeString((*_iter367)); + xfer += oprot->writeString((*_iter368)); } xfer += oprot->writeListEnd(); } @@ -824,14 +824,14 @@ uint32_t ThriftHiveMetastore_get_databases_presult::read(::apache::thrift::proto if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size368; - ::apache::thrift::protocol::TType _etype371; - xfer += iprot->readListBegin(_etype371, _size368); - (*(this->success)).resize(_size368); - uint32_t _i372; - for (_i372 = 0; _i372 < _size368; ++_i372) + uint32_t _size369; + ::apache::thrift::protocol::TType _etype372; + xfer += iprot->readListBegin(_etype372, _size369); + (*(this->success)).resize(_size369); + uint32_t _i373; + for (_i373 = 0; _i373 < _size369; ++_i373) { - xfer += iprot->readString((*(this->success))[_i372]); + xfer += iprot->readString((*(this->success))[_i373]); } xfer += iprot->readListEnd(); } @@ -929,14 +929,14 @@ uint32_t ThriftHiveMetastore_get_all_databases_result::read(::apache::thrift::pr if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size373; - ::apache::thrift::protocol::TType _etype376; - xfer += iprot->readListBegin(_etype376, _size373); - this->success.resize(_size373); - uint32_t _i377; - for (_i377 = 0; _i377 < _size373; ++_i377) + uint32_t _size374; + ::apache::thrift::protocol::TType _etype377; + xfer += iprot->readListBegin(_etype377, _size374); + this->success.resize(_size374); + uint32_t _i378; + for (_i378 = 0; _i378 < _size374; ++_i378) { - xfer += iprot->readString(this->success[_i377]); + xfer += iprot->readString(this->success[_i378]); } xfer += iprot->readListEnd(); } @@ -975,10 +975,10 @@ uint32_t ThriftHiveMetastore_get_all_databases_result::write(::apache::thrift::p xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); - std::vector ::const_iterator _iter378; - for (_iter378 = this->success.begin(); _iter378 != this->success.end(); ++_iter378) + std::vector ::const_iterator _iter379; + for (_iter379 = this->success.begin(); _iter379 != this->success.end(); ++_iter379) { - xfer += oprot->writeString((*_iter378)); + xfer += oprot->writeString((*_iter379)); } xfer += oprot->writeListEnd(); } @@ -1017,14 +1017,14 @@ uint32_t ThriftHiveMetastore_get_all_databases_presult::read(::apache::thrift::p if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size379; - ::apache::thrift::protocol::TType _etype382; - xfer += iprot->readListBegin(_etype382, _size379); - (*(this->success)).resize(_size379); - uint32_t _i383; - for (_i383 = 0; _i383 < _size379; ++_i383) + uint32_t _size380; + ::apache::thrift::protocol::TType _etype383; + xfer += iprot->readListBegin(_etype383, _size380); + (*(this->success)).resize(_size380); + uint32_t _i384; + for (_i384 = 0; _i384 < _size380; ++_i384) { - xfer += iprot->readString((*(this->success))[_i383]); + xfer += iprot->readString((*(this->success))[_i384]); } xfer += iprot->readListEnd(); } @@ -1967,17 +1967,17 @@ uint32_t ThriftHiveMetastore_get_type_all_result::read(::apache::thrift::protoco if (ftype == ::apache::thrift::protocol::T_MAP) { { this->success.clear(); - uint32_t _size384; - ::apache::thrift::protocol::TType _ktype385; - ::apache::thrift::protocol::TType _vtype386; - xfer += iprot->readMapBegin(_ktype385, _vtype386, _size384); - uint32_t _i388; - for (_i388 = 0; _i388 < _size384; ++_i388) + uint32_t _size385; + ::apache::thrift::protocol::TType _ktype386; + ::apache::thrift::protocol::TType _vtype387; + xfer += iprot->readMapBegin(_ktype386, _vtype387, _size385); + uint32_t _i389; + for (_i389 = 0; _i389 < _size385; ++_i389) { - std::string _key389; - xfer += iprot->readString(_key389); - Type& _val390 = this->success[_key389]; - xfer += _val390.read(iprot); + std::string _key390; + xfer += iprot->readString(_key390); + Type& _val391 = this->success[_key390]; + xfer += _val391.read(iprot); } xfer += iprot->readMapEnd(); } @@ -2016,11 +2016,11 @@ uint32_t ThriftHiveMetastore_get_type_all_result::write(::apache::thrift::protoc xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_MAP, 0); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); - std::map ::const_iterator _iter391; - for (_iter391 = this->success.begin(); _iter391 != this->success.end(); ++_iter391) + std::map ::const_iterator _iter392; + for (_iter392 = this->success.begin(); _iter392 != this->success.end(); ++_iter392) { - xfer += oprot->writeString(_iter391->first); - xfer += _iter391->second.write(oprot); + xfer += oprot->writeString(_iter392->first); + xfer += _iter392->second.write(oprot); } xfer += oprot->writeMapEnd(); } @@ -2059,17 +2059,17 @@ uint32_t ThriftHiveMetastore_get_type_all_presult::read(::apache::thrift::protoc if (ftype == ::apache::thrift::protocol::T_MAP) { { (*(this->success)).clear(); - uint32_t _size392; - ::apache::thrift::protocol::TType _ktype393; - ::apache::thrift::protocol::TType _vtype394; - xfer += iprot->readMapBegin(_ktype393, _vtype394, _size392); - uint32_t _i396; - for (_i396 = 0; _i396 < _size392; ++_i396) + uint32_t _size393; + ::apache::thrift::protocol::TType _ktype394; + ::apache::thrift::protocol::TType _vtype395; + xfer += iprot->readMapBegin(_ktype394, _vtype395, _size393); + uint32_t _i397; + for (_i397 = 0; _i397 < _size393; ++_i397) { - std::string _key397; - xfer += iprot->readString(_key397); - Type& _val398 = (*(this->success))[_key397]; - xfer += _val398.read(iprot); + std::string _key398; + xfer += iprot->readString(_key398); + Type& _val399 = (*(this->success))[_key398]; + xfer += _val399.read(iprot); } xfer += iprot->readMapEnd(); } @@ -2204,14 +2204,14 @@ uint32_t ThriftHiveMetastore_get_fields_result::read(::apache::thrift::protocol: if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size399; - ::apache::thrift::protocol::TType _etype402; - xfer += iprot->readListBegin(_etype402, _size399); - this->success.resize(_size399); - uint32_t _i403; - for (_i403 = 0; _i403 < _size399; ++_i403) + uint32_t _size400; + ::apache::thrift::protocol::TType _etype403; + xfer += iprot->readListBegin(_etype403, _size400); + this->success.resize(_size400); + uint32_t _i404; + for (_i404 = 0; _i404 < _size400; ++_i404) { - xfer += this->success[_i403].read(iprot); + xfer += this->success[_i404].read(iprot); } xfer += iprot->readListEnd(); } @@ -2266,10 +2266,10 @@ uint32_t ThriftHiveMetastore_get_fields_result::write(::apache::thrift::protocol xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); - std::vector ::const_iterator _iter404; - for (_iter404 = this->success.begin(); _iter404 != this->success.end(); ++_iter404) + std::vector ::const_iterator _iter405; + for (_iter405 = this->success.begin(); _iter405 != this->success.end(); ++_iter405) { - xfer += (*_iter404).write(oprot); + xfer += (*_iter405).write(oprot); } xfer += oprot->writeListEnd(); } @@ -2316,14 +2316,14 @@ uint32_t ThriftHiveMetastore_get_fields_presult::read(::apache::thrift::protocol if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size405; - ::apache::thrift::protocol::TType _etype408; - xfer += iprot->readListBegin(_etype408, _size405); - (*(this->success)).resize(_size405); - uint32_t _i409; - for (_i409 = 0; _i409 < _size405; ++_i409) + uint32_t _size406; + ::apache::thrift::protocol::TType _etype409; + xfer += iprot->readListBegin(_etype409, _size406); + (*(this->success)).resize(_size406); + uint32_t _i410; + for (_i410 = 0; _i410 < _size406; ++_i410) { - xfer += (*(this->success))[_i409].read(iprot); + xfer += (*(this->success))[_i410].read(iprot); } xfer += iprot->readListEnd(); } @@ -2474,14 +2474,14 @@ uint32_t ThriftHiveMetastore_get_schema_result::read(::apache::thrift::protocol: if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size410; - ::apache::thrift::protocol::TType _etype413; - xfer += iprot->readListBegin(_etype413, _size410); - this->success.resize(_size410); - uint32_t _i414; - for (_i414 = 0; _i414 < _size410; ++_i414) + uint32_t _size411; + ::apache::thrift::protocol::TType _etype414; + xfer += iprot->readListBegin(_etype414, _size411); + this->success.resize(_size411); + uint32_t _i415; + for (_i415 = 0; _i415 < _size411; ++_i415) { - xfer += this->success[_i414].read(iprot); + xfer += this->success[_i415].read(iprot); } xfer += iprot->readListEnd(); } @@ -2536,10 +2536,10 @@ uint32_t ThriftHiveMetastore_get_schema_result::write(::apache::thrift::protocol xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); - std::vector ::const_iterator _iter415; - for (_iter415 = this->success.begin(); _iter415 != this->success.end(); ++_iter415) + std::vector ::const_iterator _iter416; + for (_iter416 = this->success.begin(); _iter416 != this->success.end(); ++_iter416) { - xfer += (*_iter415).write(oprot); + xfer += (*_iter416).write(oprot); } xfer += oprot->writeListEnd(); } @@ -2586,14 +2586,14 @@ uint32_t ThriftHiveMetastore_get_schema_presult::read(::apache::thrift::protocol if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size416; - ::apache::thrift::protocol::TType _etype419; - xfer += iprot->readListBegin(_etype419, _size416); - (*(this->success)).resize(_size416); - uint32_t _i420; - for (_i420 = 0; _i420 < _size416; ++_i420) + uint32_t _size417; + ::apache::thrift::protocol::TType _etype420; + xfer += iprot->readListBegin(_etype420, _size417); + (*(this->success)).resize(_size417); + uint32_t _i421; + for (_i421 = 0; _i421 < _size417; ++_i421) { - xfer += (*(this->success))[_i420].read(iprot); + xfer += (*(this->success))[_i421].read(iprot); } xfer += iprot->readListEnd(); } @@ -3648,14 +3648,14 @@ uint32_t ThriftHiveMetastore_get_tables_result::read(::apache::thrift::protocol: if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size421; - ::apache::thrift::protocol::TType _etype424; - xfer += iprot->readListBegin(_etype424, _size421); - this->success.resize(_size421); - uint32_t _i425; - for (_i425 = 0; _i425 < _size421; ++_i425) + uint32_t _size422; + ::apache::thrift::protocol::TType _etype425; + xfer += iprot->readListBegin(_etype425, _size422); + this->success.resize(_size422); + uint32_t _i426; + for (_i426 = 0; _i426 < _size422; ++_i426) { - xfer += iprot->readString(this->success[_i425]); + xfer += iprot->readString(this->success[_i426]); } xfer += iprot->readListEnd(); } @@ -3694,10 +3694,10 @@ uint32_t ThriftHiveMetastore_get_tables_result::write(::apache::thrift::protocol xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); - std::vector ::const_iterator _iter426; - for (_iter426 = this->success.begin(); _iter426 != this->success.end(); ++_iter426) + std::vector ::const_iterator _iter427; + for (_iter427 = this->success.begin(); _iter427 != this->success.end(); ++_iter427) { - xfer += oprot->writeString((*_iter426)); + xfer += oprot->writeString((*_iter427)); } xfer += oprot->writeListEnd(); } @@ -3736,14 +3736,14 @@ uint32_t ThriftHiveMetastore_get_tables_presult::read(::apache::thrift::protocol if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size427; - ::apache::thrift::protocol::TType _etype430; - xfer += iprot->readListBegin(_etype430, _size427); - (*(this->success)).resize(_size427); - uint32_t _i431; - for (_i431 = 0; _i431 < _size427; ++_i431) + uint32_t _size428; + ::apache::thrift::protocol::TType _etype431; + xfer += iprot->readListBegin(_etype431, _size428); + (*(this->success)).resize(_size428); + uint32_t _i432; + for (_i432 = 0; _i432 < _size428; ++_i432) { - xfer += iprot->readString((*(this->success))[_i431]); + xfer += iprot->readString((*(this->success))[_i432]); } xfer += iprot->readListEnd(); } @@ -3862,14 +3862,14 @@ uint32_t ThriftHiveMetastore_get_all_tables_result::read(::apache::thrift::proto if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size432; - ::apache::thrift::protocol::TType _etype435; - xfer += iprot->readListBegin(_etype435, _size432); - this->success.resize(_size432); - uint32_t _i436; - for (_i436 = 0; _i436 < _size432; ++_i436) + uint32_t _size433; + ::apache::thrift::protocol::TType _etype436; + xfer += iprot->readListBegin(_etype436, _size433); + this->success.resize(_size433); + uint32_t _i437; + for (_i437 = 0; _i437 < _size433; ++_i437) { - xfer += iprot->readString(this->success[_i436]); + xfer += iprot->readString(this->success[_i437]); } xfer += iprot->readListEnd(); } @@ -3908,10 +3908,10 @@ uint32_t ThriftHiveMetastore_get_all_tables_result::write(::apache::thrift::prot xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); - std::vector ::const_iterator _iter437; - for (_iter437 = this->success.begin(); _iter437 != this->success.end(); ++_iter437) + std::vector ::const_iterator _iter438; + for (_iter438 = this->success.begin(); _iter438 != this->success.end(); ++_iter438) { - xfer += oprot->writeString((*_iter437)); + xfer += oprot->writeString((*_iter438)); } xfer += oprot->writeListEnd(); } @@ -3950,14 +3950,14 @@ uint32_t ThriftHiveMetastore_get_all_tables_presult::read(::apache::thrift::prot if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size438; - ::apache::thrift::protocol::TType _etype441; - xfer += iprot->readListBegin(_etype441, _size438); - (*(this->success)).resize(_size438); - uint32_t _i442; - for (_i442 = 0; _i442 < _size438; ++_i442) + uint32_t _size439; + ::apache::thrift::protocol::TType _etype442; + xfer += iprot->readListBegin(_etype442, _size439); + (*(this->success)).resize(_size439); + uint32_t _i443; + for (_i443 = 0; _i443 < _size439; ++_i443) { - xfer += iprot->readString((*(this->success))[_i442]); + xfer += iprot->readString((*(this->success))[_i443]); } xfer += iprot->readListEnd(); } @@ -4236,14 +4236,14 @@ uint32_t ThriftHiveMetastore_get_table_objects_by_name_args::read(::apache::thri if (ftype == ::apache::thrift::protocol::T_LIST) { { this->tbl_names.clear(); - uint32_t _size443; - ::apache::thrift::protocol::TType _etype446; - xfer += iprot->readListBegin(_etype446, _size443); - this->tbl_names.resize(_size443); - uint32_t _i447; - for (_i447 = 0; _i447 < _size443; ++_i447) + uint32_t _size444; + ::apache::thrift::protocol::TType _etype447; + xfer += iprot->readListBegin(_etype447, _size444); + this->tbl_names.resize(_size444); + uint32_t _i448; + for (_i448 = 0; _i448 < _size444; ++_i448) { - xfer += iprot->readString(this->tbl_names[_i447]); + xfer += iprot->readString(this->tbl_names[_i448]); } xfer += iprot->readListEnd(); } @@ -4275,10 +4275,10 @@ uint32_t ThriftHiveMetastore_get_table_objects_by_name_args::write(::apache::thr xfer += oprot->writeFieldBegin("tbl_names", ::apache::thrift::protocol::T_LIST, 2); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->tbl_names.size())); - std::vector ::const_iterator _iter448; - for (_iter448 = this->tbl_names.begin(); _iter448 != this->tbl_names.end(); ++_iter448) + std::vector ::const_iterator _iter449; + for (_iter449 = this->tbl_names.begin(); _iter449 != this->tbl_names.end(); ++_iter449) { - xfer += oprot->writeString((*_iter448)); + xfer += oprot->writeString((*_iter449)); } xfer += oprot->writeListEnd(); } @@ -4300,10 +4300,10 @@ uint32_t ThriftHiveMetastore_get_table_objects_by_name_pargs::write(::apache::th xfer += oprot->writeFieldBegin("tbl_names", ::apache::thrift::protocol::T_LIST, 2); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->tbl_names)).size())); - std::vector ::const_iterator _iter449; - for (_iter449 = (*(this->tbl_names)).begin(); _iter449 != (*(this->tbl_names)).end(); ++_iter449) + std::vector ::const_iterator _iter450; + for (_iter450 = (*(this->tbl_names)).begin(); _iter450 != (*(this->tbl_names)).end(); ++_iter450) { - xfer += oprot->writeString((*_iter449)); + xfer += oprot->writeString((*_iter450)); } xfer += oprot->writeListEnd(); } @@ -4338,14 +4338,14 @@ uint32_t ThriftHiveMetastore_get_table_objects_by_name_result::read(::apache::th if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size450; - ::apache::thrift::protocol::TType _etype453; - xfer += iprot->readListBegin(_etype453, _size450); - this->success.resize(_size450); - uint32_t _i454; - for (_i454 = 0; _i454 < _size450; ++_i454) + uint32_t _size451; + ::apache::thrift::protocol::TType _etype454; + xfer += iprot->readListBegin(_etype454, _size451); + this->success.resize(_size451); + uint32_t _i455; + for (_i455 = 0; _i455 < _size451; ++_i455) { - xfer += this->success[_i454].read(iprot); + xfer += this->success[_i455].read(iprot); } xfer += iprot->readListEnd(); } @@ -4400,10 +4400,10 @@ uint32_t ThriftHiveMetastore_get_table_objects_by_name_result::write(::apache::t xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); - std::vector ::const_iterator _iter455; - for (_iter455 = this->success.begin(); _iter455 != this->success.end(); ++_iter455) + std::vector
::const_iterator _iter456; + for (_iter456 = this->success.begin(); _iter456 != this->success.end(); ++_iter456) { - xfer += (*_iter455).write(oprot); + xfer += (*_iter456).write(oprot); } xfer += oprot->writeListEnd(); } @@ -4450,14 +4450,14 @@ uint32_t ThriftHiveMetastore_get_table_objects_by_name_presult::read(::apache::t if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size456; - ::apache::thrift::protocol::TType _etype459; - xfer += iprot->readListBegin(_etype459, _size456); - (*(this->success)).resize(_size456); - uint32_t _i460; - for (_i460 = 0; _i460 < _size456; ++_i460) + uint32_t _size457; + ::apache::thrift::protocol::TType _etype460; + xfer += iprot->readListBegin(_etype460, _size457); + (*(this->success)).resize(_size457); + uint32_t _i461; + for (_i461 = 0; _i461 < _size457; ++_i461) { - xfer += (*(this->success))[_i460].read(iprot); + xfer += (*(this->success))[_i461].read(iprot); } xfer += iprot->readListEnd(); } @@ -4624,14 +4624,14 @@ uint32_t ThriftHiveMetastore_get_table_names_by_filter_result::read(::apache::th if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size461; - ::apache::thrift::protocol::TType _etype464; - xfer += iprot->readListBegin(_etype464, _size461); - this->success.resize(_size461); - uint32_t _i465; - for (_i465 = 0; _i465 < _size461; ++_i465) + uint32_t _size462; + ::apache::thrift::protocol::TType _etype465; + xfer += iprot->readListBegin(_etype465, _size462); + this->success.resize(_size462); + uint32_t _i466; + for (_i466 = 0; _i466 < _size462; ++_i466) { - xfer += iprot->readString(this->success[_i465]); + xfer += iprot->readString(this->success[_i466]); } xfer += iprot->readListEnd(); } @@ -4686,10 +4686,10 @@ uint32_t ThriftHiveMetastore_get_table_names_by_filter_result::write(::apache::t xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); - std::vector ::const_iterator _iter466; - for (_iter466 = this->success.begin(); _iter466 != this->success.end(); ++_iter466) + std::vector ::const_iterator _iter467; + for (_iter467 = this->success.begin(); _iter467 != this->success.end(); ++_iter467) { - xfer += oprot->writeString((*_iter466)); + xfer += oprot->writeString((*_iter467)); } xfer += oprot->writeListEnd(); } @@ -4736,14 +4736,14 @@ uint32_t ThriftHiveMetastore_get_table_names_by_filter_presult::read(::apache::t if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size467; - ::apache::thrift::protocol::TType _etype470; - xfer += iprot->readListBegin(_etype470, _size467); - (*(this->success)).resize(_size467); - uint32_t _i471; - for (_i471 = 0; _i471 < _size467; ++_i471) + uint32_t _size468; + ::apache::thrift::protocol::TType _etype471; + xfer += iprot->readListBegin(_etype471, _size468); + (*(this->success)).resize(_size468); + uint32_t _i472; + for (_i472 = 0; _i472 < _size468; ++_i472) { - xfer += iprot->readString((*(this->success))[_i471]); + xfer += iprot->readString((*(this->success))[_i472]); } xfer += iprot->readListEnd(); } @@ -5716,14 +5716,14 @@ uint32_t ThriftHiveMetastore_add_partitions_args::read(::apache::thrift::protoco if (ftype == ::apache::thrift::protocol::T_LIST) { { this->new_parts.clear(); - uint32_t _size472; - ::apache::thrift::protocol::TType _etype475; - xfer += iprot->readListBegin(_etype475, _size472); - this->new_parts.resize(_size472); - uint32_t _i476; - for (_i476 = 0; _i476 < _size472; ++_i476) + uint32_t _size473; + ::apache::thrift::protocol::TType _etype476; + xfer += iprot->readListBegin(_etype476, _size473); + this->new_parts.resize(_size473); + uint32_t _i477; + for (_i477 = 0; _i477 < _size473; ++_i477) { - xfer += this->new_parts[_i476].read(iprot); + xfer += this->new_parts[_i477].read(iprot); } xfer += iprot->readListEnd(); } @@ -5751,10 +5751,10 @@ uint32_t ThriftHiveMetastore_add_partitions_args::write(::apache::thrift::protoc xfer += oprot->writeFieldBegin("new_parts", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->new_parts.size())); - std::vector ::const_iterator _iter477; - for (_iter477 = this->new_parts.begin(); _iter477 != this->new_parts.end(); ++_iter477) + std::vector ::const_iterator _iter478; + for (_iter478 = this->new_parts.begin(); _iter478 != this->new_parts.end(); ++_iter478) { - xfer += (*_iter477).write(oprot); + xfer += (*_iter478).write(oprot); } xfer += oprot->writeListEnd(); } @@ -5772,10 +5772,10 @@ uint32_t ThriftHiveMetastore_add_partitions_pargs::write(::apache::thrift::proto xfer += oprot->writeFieldBegin("new_parts", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast((*(this->new_parts)).size())); - std::vector ::const_iterator _iter478; - for (_iter478 = (*(this->new_parts)).begin(); _iter478 != (*(this->new_parts)).end(); ++_iter478) + std::vector ::const_iterator _iter479; + for (_iter479 = (*(this->new_parts)).begin(); _iter479 != (*(this->new_parts)).end(); ++_iter479) { - xfer += (*_iter478).write(oprot); + xfer += (*_iter479).write(oprot); } xfer += oprot->writeListEnd(); } @@ -5982,14 +5982,14 @@ uint32_t ThriftHiveMetastore_append_partition_args::read(::apache::thrift::proto if (ftype == ::apache::thrift::protocol::T_LIST) { { this->part_vals.clear(); - uint32_t _size479; - ::apache::thrift::protocol::TType _etype482; - xfer += iprot->readListBegin(_etype482, _size479); - this->part_vals.resize(_size479); - uint32_t _i483; - for (_i483 = 0; _i483 < _size479; ++_i483) + uint32_t _size480; + ::apache::thrift::protocol::TType _etype483; + xfer += iprot->readListBegin(_etype483, _size480); + this->part_vals.resize(_size480); + uint32_t _i484; + for (_i484 = 0; _i484 < _size480; ++_i484) { - xfer += iprot->readString(this->part_vals[_i483]); + xfer += iprot->readString(this->part_vals[_i484]); } xfer += iprot->readListEnd(); } @@ -6025,10 +6025,10 @@ uint32_t ThriftHiveMetastore_append_partition_args::write(::apache::thrift::prot xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); - std::vector ::const_iterator _iter484; - for (_iter484 = this->part_vals.begin(); _iter484 != this->part_vals.end(); ++_iter484) + std::vector ::const_iterator _iter485; + for (_iter485 = this->part_vals.begin(); _iter485 != this->part_vals.end(); ++_iter485) { - xfer += oprot->writeString((*_iter484)); + xfer += oprot->writeString((*_iter485)); } xfer += oprot->writeListEnd(); } @@ -6054,10 +6054,10 @@ uint32_t ThriftHiveMetastore_append_partition_pargs::write(::apache::thrift::pro xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); - std::vector ::const_iterator _iter485; - for (_iter485 = (*(this->part_vals)).begin(); _iter485 != (*(this->part_vals)).end(); ++_iter485) + std::vector ::const_iterator _iter486; + for (_iter486 = (*(this->part_vals)).begin(); _iter486 != (*(this->part_vals)).end(); ++_iter486) { - xfer += oprot->writeString((*_iter485)); + xfer += oprot->writeString((*_iter486)); } xfer += oprot->writeListEnd(); } @@ -6486,14 +6486,14 @@ uint32_t ThriftHiveMetastore_append_partition_with_environment_context_args::rea if (ftype == ::apache::thrift::protocol::T_LIST) { { this->part_vals.clear(); - uint32_t _size486; - ::apache::thrift::protocol::TType _etype489; - xfer += iprot->readListBegin(_etype489, _size486); - this->part_vals.resize(_size486); - uint32_t _i490; - for (_i490 = 0; _i490 < _size486; ++_i490) + uint32_t _size487; + ::apache::thrift::protocol::TType _etype490; + xfer += iprot->readListBegin(_etype490, _size487); + this->part_vals.resize(_size487); + uint32_t _i491; + for (_i491 = 0; _i491 < _size487; ++_i491) { - xfer += iprot->readString(this->part_vals[_i490]); + xfer += iprot->readString(this->part_vals[_i491]); } xfer += iprot->readListEnd(); } @@ -6537,10 +6537,10 @@ uint32_t ThriftHiveMetastore_append_partition_with_environment_context_args::wri xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); - std::vector ::const_iterator _iter491; - for (_iter491 = this->part_vals.begin(); _iter491 != this->part_vals.end(); ++_iter491) + std::vector ::const_iterator _iter492; + for (_iter492 = this->part_vals.begin(); _iter492 != this->part_vals.end(); ++_iter492) { - xfer += oprot->writeString((*_iter491)); + xfer += oprot->writeString((*_iter492)); } xfer += oprot->writeListEnd(); } @@ -6570,10 +6570,10 @@ uint32_t ThriftHiveMetastore_append_partition_with_environment_context_pargs::wr xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); - std::vector ::const_iterator _iter492; - for (_iter492 = (*(this->part_vals)).begin(); _iter492 != (*(this->part_vals)).end(); ++_iter492) + std::vector ::const_iterator _iter493; + for (_iter493 = (*(this->part_vals)).begin(); _iter493 != (*(this->part_vals)).end(); ++_iter493) { - xfer += oprot->writeString((*_iter492)); + xfer += oprot->writeString((*_iter493)); } xfer += oprot->writeListEnd(); } @@ -7308,14 +7308,14 @@ uint32_t ThriftHiveMetastore_drop_partition_args::read(::apache::thrift::protoco if (ftype == ::apache::thrift::protocol::T_LIST) { { this->part_vals.clear(); - uint32_t _size493; - ::apache::thrift::protocol::TType _etype496; - xfer += iprot->readListBegin(_etype496, _size493); - this->part_vals.resize(_size493); - uint32_t _i497; - for (_i497 = 0; _i497 < _size493; ++_i497) + uint32_t _size494; + ::apache::thrift::protocol::TType _etype497; + xfer += iprot->readListBegin(_etype497, _size494); + this->part_vals.resize(_size494); + uint32_t _i498; + for (_i498 = 0; _i498 < _size494; ++_i498) { - xfer += iprot->readString(this->part_vals[_i497]); + xfer += iprot->readString(this->part_vals[_i498]); } xfer += iprot->readListEnd(); } @@ -7359,10 +7359,10 @@ uint32_t ThriftHiveMetastore_drop_partition_args::write(::apache::thrift::protoc xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); - std::vector ::const_iterator _iter498; - for (_iter498 = this->part_vals.begin(); _iter498 != this->part_vals.end(); ++_iter498) + std::vector ::const_iterator _iter499; + for (_iter499 = this->part_vals.begin(); _iter499 != this->part_vals.end(); ++_iter499) { - xfer += oprot->writeString((*_iter498)); + xfer += oprot->writeString((*_iter499)); } xfer += oprot->writeListEnd(); } @@ -7392,10 +7392,10 @@ uint32_t ThriftHiveMetastore_drop_partition_pargs::write(::apache::thrift::proto xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); - std::vector ::const_iterator _iter499; - for (_iter499 = (*(this->part_vals)).begin(); _iter499 != (*(this->part_vals)).end(); ++_iter499) + std::vector ::const_iterator _iter500; + for (_iter500 = (*(this->part_vals)).begin(); _iter500 != (*(this->part_vals)).end(); ++_iter500) { - xfer += oprot->writeString((*_iter499)); + xfer += oprot->writeString((*_iter500)); } xfer += oprot->writeListEnd(); } @@ -7586,14 +7586,14 @@ uint32_t ThriftHiveMetastore_drop_partition_with_environment_context_args::read( if (ftype == ::apache::thrift::protocol::T_LIST) { { this->part_vals.clear(); - uint32_t _size500; - ::apache::thrift::protocol::TType _etype503; - xfer += iprot->readListBegin(_etype503, _size500); - this->part_vals.resize(_size500); - uint32_t _i504; - for (_i504 = 0; _i504 < _size500; ++_i504) + uint32_t _size501; + ::apache::thrift::protocol::TType _etype504; + xfer += iprot->readListBegin(_etype504, _size501); + this->part_vals.resize(_size501); + uint32_t _i505; + for (_i505 = 0; _i505 < _size501; ++_i505) { - xfer += iprot->readString(this->part_vals[_i504]); + xfer += iprot->readString(this->part_vals[_i505]); } xfer += iprot->readListEnd(); } @@ -7645,10 +7645,10 @@ uint32_t ThriftHiveMetastore_drop_partition_with_environment_context_args::write xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); - std::vector ::const_iterator _iter505; - for (_iter505 = this->part_vals.begin(); _iter505 != this->part_vals.end(); ++_iter505) + std::vector ::const_iterator _iter506; + for (_iter506 = this->part_vals.begin(); _iter506 != this->part_vals.end(); ++_iter506) { - xfer += oprot->writeString((*_iter505)); + xfer += oprot->writeString((*_iter506)); } xfer += oprot->writeListEnd(); } @@ -7682,10 +7682,10 @@ uint32_t ThriftHiveMetastore_drop_partition_with_environment_context_pargs::writ xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); - std::vector ::const_iterator _iter506; - for (_iter506 = (*(this->part_vals)).begin(); _iter506 != (*(this->part_vals)).end(); ++_iter506) + std::vector ::const_iterator _iter507; + for (_iter507 = (*(this->part_vals)).begin(); _iter507 != (*(this->part_vals)).end(); ++_iter507) { - xfer += oprot->writeString((*_iter506)); + xfer += oprot->writeString((*_iter507)); } xfer += oprot->writeListEnd(); } @@ -8598,14 +8598,14 @@ uint32_t ThriftHiveMetastore_get_partition_args::read(::apache::thrift::protocol if (ftype == ::apache::thrift::protocol::T_LIST) { { this->part_vals.clear(); - uint32_t _size507; - ::apache::thrift::protocol::TType _etype510; - xfer += iprot->readListBegin(_etype510, _size507); - this->part_vals.resize(_size507); - uint32_t _i511; - for (_i511 = 0; _i511 < _size507; ++_i511) + uint32_t _size508; + ::apache::thrift::protocol::TType _etype511; + xfer += iprot->readListBegin(_etype511, _size508); + this->part_vals.resize(_size508); + uint32_t _i512; + for (_i512 = 0; _i512 < _size508; ++_i512) { - xfer += iprot->readString(this->part_vals[_i511]); + xfer += iprot->readString(this->part_vals[_i512]); } xfer += iprot->readListEnd(); } @@ -8641,10 +8641,10 @@ uint32_t ThriftHiveMetastore_get_partition_args::write(::apache::thrift::protoco xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); - std::vector ::const_iterator _iter512; - for (_iter512 = this->part_vals.begin(); _iter512 != this->part_vals.end(); ++_iter512) + std::vector ::const_iterator _iter513; + for (_iter513 = this->part_vals.begin(); _iter513 != this->part_vals.end(); ++_iter513) { - xfer += oprot->writeString((*_iter512)); + xfer += oprot->writeString((*_iter513)); } xfer += oprot->writeListEnd(); } @@ -8670,10 +8670,10 @@ uint32_t ThriftHiveMetastore_get_partition_pargs::write(::apache::thrift::protoc xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); - std::vector ::const_iterator _iter513; - for (_iter513 = (*(this->part_vals)).begin(); _iter513 != (*(this->part_vals)).end(); ++_iter513) + std::vector ::const_iterator _iter514; + for (_iter514 = (*(this->part_vals)).begin(); _iter514 != (*(this->part_vals)).end(); ++_iter514) { - xfer += oprot->writeString((*_iter513)); + xfer += oprot->writeString((*_iter514)); } xfer += oprot->writeListEnd(); } @@ -8844,17 +8844,17 @@ uint32_t ThriftHiveMetastore_exchange_partition_args::read(::apache::thrift::pro if (ftype == ::apache::thrift::protocol::T_MAP) { { this->partitionSpecs.clear(); - uint32_t _size514; - ::apache::thrift::protocol::TType _ktype515; - ::apache::thrift::protocol::TType _vtype516; - xfer += iprot->readMapBegin(_ktype515, _vtype516, _size514); - uint32_t _i518; - for (_i518 = 0; _i518 < _size514; ++_i518) + uint32_t _size515; + ::apache::thrift::protocol::TType _ktype516; + ::apache::thrift::protocol::TType _vtype517; + xfer += iprot->readMapBegin(_ktype516, _vtype517, _size515); + uint32_t _i519; + for (_i519 = 0; _i519 < _size515; ++_i519) { - std::string _key519; - xfer += iprot->readString(_key519); - std::string& _val520 = this->partitionSpecs[_key519]; - xfer += iprot->readString(_val520); + std::string _key520; + xfer += iprot->readString(_key520); + std::string& _val521 = this->partitionSpecs[_key520]; + xfer += iprot->readString(_val521); } xfer += iprot->readMapEnd(); } @@ -8914,11 +8914,11 @@ uint32_t ThriftHiveMetastore_exchange_partition_args::write(::apache::thrift::pr xfer += oprot->writeFieldBegin("partitionSpecs", ::apache::thrift::protocol::T_MAP, 1); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->partitionSpecs.size())); - std::map ::const_iterator _iter521; - for (_iter521 = this->partitionSpecs.begin(); _iter521 != this->partitionSpecs.end(); ++_iter521) + std::map ::const_iterator _iter522; + for (_iter522 = this->partitionSpecs.begin(); _iter522 != this->partitionSpecs.end(); ++_iter522) { - xfer += oprot->writeString(_iter521->first); - xfer += oprot->writeString(_iter521->second); + xfer += oprot->writeString(_iter522->first); + xfer += oprot->writeString(_iter522->second); } xfer += oprot->writeMapEnd(); } @@ -8952,11 +8952,11 @@ uint32_t ThriftHiveMetastore_exchange_partition_pargs::write(::apache::thrift::p xfer += oprot->writeFieldBegin("partitionSpecs", ::apache::thrift::protocol::T_MAP, 1); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast((*(this->partitionSpecs)).size())); - std::map ::const_iterator _iter522; - for (_iter522 = (*(this->partitionSpecs)).begin(); _iter522 != (*(this->partitionSpecs)).end(); ++_iter522) + std::map ::const_iterator _iter523; + for (_iter523 = (*(this->partitionSpecs)).begin(); _iter523 != (*(this->partitionSpecs)).end(); ++_iter523) { - xfer += oprot->writeString(_iter522->first); - xfer += oprot->writeString(_iter522->second); + xfer += oprot->writeString(_iter523->first); + xfer += oprot->writeString(_iter523->second); } xfer += oprot->writeMapEnd(); } @@ -9199,14 +9199,14 @@ uint32_t ThriftHiveMetastore_get_partition_with_auth_args::read(::apache::thrift if (ftype == ::apache::thrift::protocol::T_LIST) { { this->part_vals.clear(); - uint32_t _size523; - ::apache::thrift::protocol::TType _etype526; - xfer += iprot->readListBegin(_etype526, _size523); - this->part_vals.resize(_size523); - uint32_t _i527; - for (_i527 = 0; _i527 < _size523; ++_i527) + uint32_t _size524; + ::apache::thrift::protocol::TType _etype527; + xfer += iprot->readListBegin(_etype527, _size524); + this->part_vals.resize(_size524); + uint32_t _i528; + for (_i528 = 0; _i528 < _size524; ++_i528) { - xfer += iprot->readString(this->part_vals[_i527]); + xfer += iprot->readString(this->part_vals[_i528]); } xfer += iprot->readListEnd(); } @@ -9227,14 +9227,14 @@ uint32_t ThriftHiveMetastore_get_partition_with_auth_args::read(::apache::thrift if (ftype == ::apache::thrift::protocol::T_LIST) { { this->group_names.clear(); - uint32_t _size528; - ::apache::thrift::protocol::TType _etype531; - xfer += iprot->readListBegin(_etype531, _size528); - this->group_names.resize(_size528); - uint32_t _i532; - for (_i532 = 0; _i532 < _size528; ++_i532) + uint32_t _size529; + ::apache::thrift::protocol::TType _etype532; + xfer += iprot->readListBegin(_etype532, _size529); + this->group_names.resize(_size529); + uint32_t _i533; + for (_i533 = 0; _i533 < _size529; ++_i533) { - xfer += iprot->readString(this->group_names[_i532]); + xfer += iprot->readString(this->group_names[_i533]); } xfer += iprot->readListEnd(); } @@ -9270,10 +9270,10 @@ uint32_t ThriftHiveMetastore_get_partition_with_auth_args::write(::apache::thrif xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); - std::vector ::const_iterator _iter533; - for (_iter533 = this->part_vals.begin(); _iter533 != this->part_vals.end(); ++_iter533) + std::vector ::const_iterator _iter534; + for (_iter534 = this->part_vals.begin(); _iter534 != this->part_vals.end(); ++_iter534) { - xfer += oprot->writeString((*_iter533)); + xfer += oprot->writeString((*_iter534)); } xfer += oprot->writeListEnd(); } @@ -9286,10 +9286,10 @@ uint32_t ThriftHiveMetastore_get_partition_with_auth_args::write(::apache::thrif xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 5); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->group_names.size())); - std::vector ::const_iterator _iter534; - for (_iter534 = this->group_names.begin(); _iter534 != this->group_names.end(); ++_iter534) + std::vector ::const_iterator _iter535; + for (_iter535 = this->group_names.begin(); _iter535 != this->group_names.end(); ++_iter535) { - xfer += oprot->writeString((*_iter534)); + xfer += oprot->writeString((*_iter535)); } xfer += oprot->writeListEnd(); } @@ -9315,10 +9315,10 @@ uint32_t ThriftHiveMetastore_get_partition_with_auth_pargs::write(::apache::thri xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); - std::vector ::const_iterator _iter535; - for (_iter535 = (*(this->part_vals)).begin(); _iter535 != (*(this->part_vals)).end(); ++_iter535) + std::vector ::const_iterator _iter536; + for (_iter536 = (*(this->part_vals)).begin(); _iter536 != (*(this->part_vals)).end(); ++_iter536) { - xfer += oprot->writeString((*_iter535)); + xfer += oprot->writeString((*_iter536)); } xfer += oprot->writeListEnd(); } @@ -9331,10 +9331,10 @@ uint32_t ThriftHiveMetastore_get_partition_with_auth_pargs::write(::apache::thri xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 5); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->group_names)).size())); - std::vector ::const_iterator _iter536; - for (_iter536 = (*(this->group_names)).begin(); _iter536 != (*(this->group_names)).end(); ++_iter536) + std::vector ::const_iterator _iter537; + for (_iter537 = (*(this->group_names)).begin(); _iter537 != (*(this->group_names)).end(); ++_iter537) { - xfer += oprot->writeString((*_iter536)); + xfer += oprot->writeString((*_iter537)); } xfer += oprot->writeListEnd(); } @@ -9837,14 +9837,14 @@ uint32_t ThriftHiveMetastore_get_partitions_result::read(::apache::thrift::proto if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size537; - ::apache::thrift::protocol::TType _etype540; - xfer += iprot->readListBegin(_etype540, _size537); - this->success.resize(_size537); - uint32_t _i541; - for (_i541 = 0; _i541 < _size537; ++_i541) + uint32_t _size538; + ::apache::thrift::protocol::TType _etype541; + xfer += iprot->readListBegin(_etype541, _size538); + this->success.resize(_size538); + uint32_t _i542; + for (_i542 = 0; _i542 < _size538; ++_i542) { - xfer += this->success[_i541].read(iprot); + xfer += this->success[_i542].read(iprot); } xfer += iprot->readListEnd(); } @@ -9891,10 +9891,10 @@ uint32_t ThriftHiveMetastore_get_partitions_result::write(::apache::thrift::prot xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); - std::vector ::const_iterator _iter542; - for (_iter542 = this->success.begin(); _iter542 != this->success.end(); ++_iter542) + std::vector ::const_iterator _iter543; + for (_iter543 = this->success.begin(); _iter543 != this->success.end(); ++_iter543) { - xfer += (*_iter542).write(oprot); + xfer += (*_iter543).write(oprot); } xfer += oprot->writeListEnd(); } @@ -9937,14 +9937,14 @@ uint32_t ThriftHiveMetastore_get_partitions_presult::read(::apache::thrift::prot if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size543; - ::apache::thrift::protocol::TType _etype546; - xfer += iprot->readListBegin(_etype546, _size543); - (*(this->success)).resize(_size543); - uint32_t _i547; - for (_i547 = 0; _i547 < _size543; ++_i547) + uint32_t _size544; + ::apache::thrift::protocol::TType _etype547; + xfer += iprot->readListBegin(_etype547, _size544); + (*(this->success)).resize(_size544); + uint32_t _i548; + for (_i548 = 0; _i548 < _size544; ++_i548) { - xfer += (*(this->success))[_i547].read(iprot); + xfer += (*(this->success))[_i548].read(iprot); } xfer += iprot->readListEnd(); } @@ -10037,14 +10037,14 @@ uint32_t ThriftHiveMetastore_get_partitions_with_auth_args::read(::apache::thrif if (ftype == ::apache::thrift::protocol::T_LIST) { { this->group_names.clear(); - uint32_t _size548; - ::apache::thrift::protocol::TType _etype551; - xfer += iprot->readListBegin(_etype551, _size548); - this->group_names.resize(_size548); - uint32_t _i552; - for (_i552 = 0; _i552 < _size548; ++_i552) + uint32_t _size549; + ::apache::thrift::protocol::TType _etype552; + xfer += iprot->readListBegin(_etype552, _size549); + this->group_names.resize(_size549); + uint32_t _i553; + for (_i553 = 0; _i553 < _size549; ++_i553) { - xfer += iprot->readString(this->group_names[_i552]); + xfer += iprot->readString(this->group_names[_i553]); } xfer += iprot->readListEnd(); } @@ -10088,10 +10088,10 @@ uint32_t ThriftHiveMetastore_get_partitions_with_auth_args::write(::apache::thri xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 5); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->group_names.size())); - std::vector ::const_iterator _iter553; - for (_iter553 = this->group_names.begin(); _iter553 != this->group_names.end(); ++_iter553) + std::vector ::const_iterator _iter554; + for (_iter554 = this->group_names.begin(); _iter554 != this->group_names.end(); ++_iter554) { - xfer += oprot->writeString((*_iter553)); + xfer += oprot->writeString((*_iter554)); } xfer += oprot->writeListEnd(); } @@ -10125,10 +10125,10 @@ uint32_t ThriftHiveMetastore_get_partitions_with_auth_pargs::write(::apache::thr xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 5); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->group_names)).size())); - std::vector ::const_iterator _iter554; - for (_iter554 = (*(this->group_names)).begin(); _iter554 != (*(this->group_names)).end(); ++_iter554) + std::vector ::const_iterator _iter555; + for (_iter555 = (*(this->group_names)).begin(); _iter555 != (*(this->group_names)).end(); ++_iter555) { - xfer += oprot->writeString((*_iter554)); + xfer += oprot->writeString((*_iter555)); } xfer += oprot->writeListEnd(); } @@ -10163,14 +10163,14 @@ uint32_t ThriftHiveMetastore_get_partitions_with_auth_result::read(::apache::thr if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size555; - ::apache::thrift::protocol::TType _etype558; - xfer += iprot->readListBegin(_etype558, _size555); - this->success.resize(_size555); - uint32_t _i559; - for (_i559 = 0; _i559 < _size555; ++_i559) + uint32_t _size556; + ::apache::thrift::protocol::TType _etype559; + xfer += iprot->readListBegin(_etype559, _size556); + this->success.resize(_size556); + uint32_t _i560; + for (_i560 = 0; _i560 < _size556; ++_i560) { - xfer += this->success[_i559].read(iprot); + xfer += this->success[_i560].read(iprot); } xfer += iprot->readListEnd(); } @@ -10217,10 +10217,10 @@ uint32_t ThriftHiveMetastore_get_partitions_with_auth_result::write(::apache::th xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); - std::vector ::const_iterator _iter560; - for (_iter560 = this->success.begin(); _iter560 != this->success.end(); ++_iter560) + std::vector ::const_iterator _iter561; + for (_iter561 = this->success.begin(); _iter561 != this->success.end(); ++_iter561) { - xfer += (*_iter560).write(oprot); + xfer += (*_iter561).write(oprot); } xfer += oprot->writeListEnd(); } @@ -10263,14 +10263,14 @@ uint32_t ThriftHiveMetastore_get_partitions_with_auth_presult::read(::apache::th if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size561; - ::apache::thrift::protocol::TType _etype564; - xfer += iprot->readListBegin(_etype564, _size561); - (*(this->success)).resize(_size561); - uint32_t _i565; - for (_i565 = 0; _i565 < _size561; ++_i565) + uint32_t _size562; + ::apache::thrift::protocol::TType _etype565; + xfer += iprot->readListBegin(_etype565, _size562); + (*(this->success)).resize(_size562); + uint32_t _i566; + for (_i566 = 0; _i566 < _size562; ++_i566) { - xfer += (*(this->success))[_i565].read(iprot); + xfer += (*(this->success))[_i566].read(iprot); } xfer += iprot->readListEnd(); } @@ -10429,14 +10429,14 @@ uint32_t ThriftHiveMetastore_get_partition_names_result::read(::apache::thrift:: if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size566; - ::apache::thrift::protocol::TType _etype569; - xfer += iprot->readListBegin(_etype569, _size566); - this->success.resize(_size566); - uint32_t _i570; - for (_i570 = 0; _i570 < _size566; ++_i570) + uint32_t _size567; + ::apache::thrift::protocol::TType _etype570; + xfer += iprot->readListBegin(_etype570, _size567); + this->success.resize(_size567); + uint32_t _i571; + for (_i571 = 0; _i571 < _size567; ++_i571) { - xfer += iprot->readString(this->success[_i570]); + xfer += iprot->readString(this->success[_i571]); } xfer += iprot->readListEnd(); } @@ -10475,10 +10475,10 @@ uint32_t ThriftHiveMetastore_get_partition_names_result::write(::apache::thrift: xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); - std::vector ::const_iterator _iter571; - for (_iter571 = this->success.begin(); _iter571 != this->success.end(); ++_iter571) + std::vector ::const_iterator _iter572; + for (_iter572 = this->success.begin(); _iter572 != this->success.end(); ++_iter572) { - xfer += oprot->writeString((*_iter571)); + xfer += oprot->writeString((*_iter572)); } xfer += oprot->writeListEnd(); } @@ -10517,14 +10517,14 @@ uint32_t ThriftHiveMetastore_get_partition_names_presult::read(::apache::thrift: if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size572; - ::apache::thrift::protocol::TType _etype575; - xfer += iprot->readListBegin(_etype575, _size572); - (*(this->success)).resize(_size572); - uint32_t _i576; - for (_i576 = 0; _i576 < _size572; ++_i576) + uint32_t _size573; + ::apache::thrift::protocol::TType _etype576; + xfer += iprot->readListBegin(_etype576, _size573); + (*(this->success)).resize(_size573); + uint32_t _i577; + for (_i577 = 0; _i577 < _size573; ++_i577) { - xfer += iprot->readString((*(this->success))[_i576]); + xfer += iprot->readString((*(this->success))[_i577]); } xfer += iprot->readListEnd(); } @@ -10593,14 +10593,14 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_args::read(::apache::thrift::prot if (ftype == ::apache::thrift::protocol::T_LIST) { { this->part_vals.clear(); - uint32_t _size577; - ::apache::thrift::protocol::TType _etype580; - xfer += iprot->readListBegin(_etype580, _size577); - this->part_vals.resize(_size577); - uint32_t _i581; - for (_i581 = 0; _i581 < _size577; ++_i581) + uint32_t _size578; + ::apache::thrift::protocol::TType _etype581; + xfer += iprot->readListBegin(_etype581, _size578); + this->part_vals.resize(_size578); + uint32_t _i582; + for (_i582 = 0; _i582 < _size578; ++_i582) { - xfer += iprot->readString(this->part_vals[_i581]); + xfer += iprot->readString(this->part_vals[_i582]); } xfer += iprot->readListEnd(); } @@ -10644,10 +10644,10 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_args::write(::apache::thrift::pro xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); - std::vector ::const_iterator _iter582; - for (_iter582 = this->part_vals.begin(); _iter582 != this->part_vals.end(); ++_iter582) + std::vector ::const_iterator _iter583; + for (_iter583 = this->part_vals.begin(); _iter583 != this->part_vals.end(); ++_iter583) { - xfer += oprot->writeString((*_iter582)); + xfer += oprot->writeString((*_iter583)); } xfer += oprot->writeListEnd(); } @@ -10677,10 +10677,10 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_pargs::write(::apache::thrift::pr xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); - std::vector ::const_iterator _iter583; - for (_iter583 = (*(this->part_vals)).begin(); _iter583 != (*(this->part_vals)).end(); ++_iter583) + std::vector ::const_iterator _iter584; + for (_iter584 = (*(this->part_vals)).begin(); _iter584 != (*(this->part_vals)).end(); ++_iter584) { - xfer += oprot->writeString((*_iter583)); + xfer += oprot->writeString((*_iter584)); } xfer += oprot->writeListEnd(); } @@ -10719,14 +10719,14 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_result::read(::apache::thrift::pr if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size584; - ::apache::thrift::protocol::TType _etype587; - xfer += iprot->readListBegin(_etype587, _size584); - this->success.resize(_size584); - uint32_t _i588; - for (_i588 = 0; _i588 < _size584; ++_i588) + uint32_t _size585; + ::apache::thrift::protocol::TType _etype588; + xfer += iprot->readListBegin(_etype588, _size585); + this->success.resize(_size585); + uint32_t _i589; + for (_i589 = 0; _i589 < _size585; ++_i589) { - xfer += this->success[_i588].read(iprot); + xfer += this->success[_i589].read(iprot); } xfer += iprot->readListEnd(); } @@ -10773,10 +10773,10 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_result::write(::apache::thrift::p xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); - std::vector ::const_iterator _iter589; - for (_iter589 = this->success.begin(); _iter589 != this->success.end(); ++_iter589) + std::vector ::const_iterator _iter590; + for (_iter590 = this->success.begin(); _iter590 != this->success.end(); ++_iter590) { - xfer += (*_iter589).write(oprot); + xfer += (*_iter590).write(oprot); } xfer += oprot->writeListEnd(); } @@ -10819,14 +10819,14 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_presult::read(::apache::thrift::p if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size590; - ::apache::thrift::protocol::TType _etype593; - xfer += iprot->readListBegin(_etype593, _size590); - (*(this->success)).resize(_size590); - uint32_t _i594; - for (_i594 = 0; _i594 < _size590; ++_i594) + uint32_t _size591; + ::apache::thrift::protocol::TType _etype594; + xfer += iprot->readListBegin(_etype594, _size591); + (*(this->success)).resize(_size591); + uint32_t _i595; + for (_i595 = 0; _i595 < _size591; ++_i595) { - xfer += (*(this->success))[_i594].read(iprot); + xfer += (*(this->success))[_i595].read(iprot); } xfer += iprot->readListEnd(); } @@ -10903,14 +10903,14 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_args::read(::apache::th if (ftype == ::apache::thrift::protocol::T_LIST) { { this->part_vals.clear(); - uint32_t _size595; - ::apache::thrift::protocol::TType _etype598; - xfer += iprot->readListBegin(_etype598, _size595); - this->part_vals.resize(_size595); - uint32_t _i599; - for (_i599 = 0; _i599 < _size595; ++_i599) + uint32_t _size596; + ::apache::thrift::protocol::TType _etype599; + xfer += iprot->readListBegin(_etype599, _size596); + this->part_vals.resize(_size596); + uint32_t _i600; + for (_i600 = 0; _i600 < _size596; ++_i600) { - xfer += iprot->readString(this->part_vals[_i599]); + xfer += iprot->readString(this->part_vals[_i600]); } xfer += iprot->readListEnd(); } @@ -10939,14 +10939,14 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_args::read(::apache::th if (ftype == ::apache::thrift::protocol::T_LIST) { { this->group_names.clear(); - uint32_t _size600; - ::apache::thrift::protocol::TType _etype603; - xfer += iprot->readListBegin(_etype603, _size600); - this->group_names.resize(_size600); - uint32_t _i604; - for (_i604 = 0; _i604 < _size600; ++_i604) + uint32_t _size601; + ::apache::thrift::protocol::TType _etype604; + xfer += iprot->readListBegin(_etype604, _size601); + this->group_names.resize(_size601); + uint32_t _i605; + for (_i605 = 0; _i605 < _size601; ++_i605) { - xfer += iprot->readString(this->group_names[_i604]); + xfer += iprot->readString(this->group_names[_i605]); } xfer += iprot->readListEnd(); } @@ -10982,10 +10982,10 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_args::write(::apache::t xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); - std::vector ::const_iterator _iter605; - for (_iter605 = this->part_vals.begin(); _iter605 != this->part_vals.end(); ++_iter605) + std::vector ::const_iterator _iter606; + for (_iter606 = this->part_vals.begin(); _iter606 != this->part_vals.end(); ++_iter606) { - xfer += oprot->writeString((*_iter605)); + xfer += oprot->writeString((*_iter606)); } xfer += oprot->writeListEnd(); } @@ -11002,10 +11002,10 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_args::write(::apache::t xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 6); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->group_names.size())); - std::vector ::const_iterator _iter606; - for (_iter606 = this->group_names.begin(); _iter606 != this->group_names.end(); ++_iter606) + std::vector ::const_iterator _iter607; + for (_iter607 = this->group_names.begin(); _iter607 != this->group_names.end(); ++_iter607) { - xfer += oprot->writeString((*_iter606)); + xfer += oprot->writeString((*_iter607)); } xfer += oprot->writeListEnd(); } @@ -11031,10 +11031,10 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_pargs::write(::apache:: xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); - std::vector ::const_iterator _iter607; - for (_iter607 = (*(this->part_vals)).begin(); _iter607 != (*(this->part_vals)).end(); ++_iter607) + std::vector ::const_iterator _iter608; + for (_iter608 = (*(this->part_vals)).begin(); _iter608 != (*(this->part_vals)).end(); ++_iter608) { - xfer += oprot->writeString((*_iter607)); + xfer += oprot->writeString((*_iter608)); } xfer += oprot->writeListEnd(); } @@ -11051,10 +11051,10 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_pargs::write(::apache:: xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 6); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->group_names)).size())); - std::vector ::const_iterator _iter608; - for (_iter608 = (*(this->group_names)).begin(); _iter608 != (*(this->group_names)).end(); ++_iter608) + std::vector ::const_iterator _iter609; + for (_iter609 = (*(this->group_names)).begin(); _iter609 != (*(this->group_names)).end(); ++_iter609) { - xfer += oprot->writeString((*_iter608)); + xfer += oprot->writeString((*_iter609)); } xfer += oprot->writeListEnd(); } @@ -11089,14 +11089,14 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_result::read(::apache:: if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size609; - ::apache::thrift::protocol::TType _etype612; - xfer += iprot->readListBegin(_etype612, _size609); - this->success.resize(_size609); - uint32_t _i613; - for (_i613 = 0; _i613 < _size609; ++_i613) + uint32_t _size610; + ::apache::thrift::protocol::TType _etype613; + xfer += iprot->readListBegin(_etype613, _size610); + this->success.resize(_size610); + uint32_t _i614; + for (_i614 = 0; _i614 < _size610; ++_i614) { - xfer += this->success[_i613].read(iprot); + xfer += this->success[_i614].read(iprot); } xfer += iprot->readListEnd(); } @@ -11143,10 +11143,10 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_result::write(::apache: xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); - std::vector ::const_iterator _iter614; - for (_iter614 = this->success.begin(); _iter614 != this->success.end(); ++_iter614) + std::vector ::const_iterator _iter615; + for (_iter615 = this->success.begin(); _iter615 != this->success.end(); ++_iter615) { - xfer += (*_iter614).write(oprot); + xfer += (*_iter615).write(oprot); } xfer += oprot->writeListEnd(); } @@ -11189,14 +11189,14 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_presult::read(::apache: if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size615; - ::apache::thrift::protocol::TType _etype618; - xfer += iprot->readListBegin(_etype618, _size615); - (*(this->success)).resize(_size615); - uint32_t _i619; - for (_i619 = 0; _i619 < _size615; ++_i619) + uint32_t _size616; + ::apache::thrift::protocol::TType _etype619; + xfer += iprot->readListBegin(_etype619, _size616); + (*(this->success)).resize(_size616); + uint32_t _i620; + for (_i620 = 0; _i620 < _size616; ++_i620) { - xfer += (*(this->success))[_i619].read(iprot); + xfer += (*(this->success))[_i620].read(iprot); } xfer += iprot->readListEnd(); } @@ -11273,14 +11273,14 @@ uint32_t ThriftHiveMetastore_get_partition_names_ps_args::read(::apache::thrift: if (ftype == ::apache::thrift::protocol::T_LIST) { { this->part_vals.clear(); - uint32_t _size620; - ::apache::thrift::protocol::TType _etype623; - xfer += iprot->readListBegin(_etype623, _size620); - this->part_vals.resize(_size620); - uint32_t _i624; - for (_i624 = 0; _i624 < _size620; ++_i624) + uint32_t _size621; + ::apache::thrift::protocol::TType _etype624; + xfer += iprot->readListBegin(_etype624, _size621); + this->part_vals.resize(_size621); + uint32_t _i625; + for (_i625 = 0; _i625 < _size621; ++_i625) { - xfer += iprot->readString(this->part_vals[_i624]); + xfer += iprot->readString(this->part_vals[_i625]); } xfer += iprot->readListEnd(); } @@ -11324,10 +11324,10 @@ uint32_t ThriftHiveMetastore_get_partition_names_ps_args::write(::apache::thrift xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); - std::vector ::const_iterator _iter625; - for (_iter625 = this->part_vals.begin(); _iter625 != this->part_vals.end(); ++_iter625) + std::vector ::const_iterator _iter626; + for (_iter626 = this->part_vals.begin(); _iter626 != this->part_vals.end(); ++_iter626) { - xfer += oprot->writeString((*_iter625)); + xfer += oprot->writeString((*_iter626)); } xfer += oprot->writeListEnd(); } @@ -11357,10 +11357,10 @@ uint32_t ThriftHiveMetastore_get_partition_names_ps_pargs::write(::apache::thrif xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); - std::vector ::const_iterator _iter626; - for (_iter626 = (*(this->part_vals)).begin(); _iter626 != (*(this->part_vals)).end(); ++_iter626) + std::vector ::const_iterator _iter627; + for (_iter627 = (*(this->part_vals)).begin(); _iter627 != (*(this->part_vals)).end(); ++_iter627) { - xfer += oprot->writeString((*_iter626)); + xfer += oprot->writeString((*_iter627)); } xfer += oprot->writeListEnd(); } @@ -11399,14 +11399,14 @@ uint32_t ThriftHiveMetastore_get_partition_names_ps_result::read(::apache::thrif if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size627; - ::apache::thrift::protocol::TType _etype630; - xfer += iprot->readListBegin(_etype630, _size627); - this->success.resize(_size627); - uint32_t _i631; - for (_i631 = 0; _i631 < _size627; ++_i631) + uint32_t _size628; + ::apache::thrift::protocol::TType _etype631; + xfer += iprot->readListBegin(_etype631, _size628); + this->success.resize(_size628); + uint32_t _i632; + for (_i632 = 0; _i632 < _size628; ++_i632) { - xfer += iprot->readString(this->success[_i631]); + xfer += iprot->readString(this->success[_i632]); } xfer += iprot->readListEnd(); } @@ -11453,10 +11453,10 @@ uint32_t ThriftHiveMetastore_get_partition_names_ps_result::write(::apache::thri xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); - std::vector ::const_iterator _iter632; - for (_iter632 = this->success.begin(); _iter632 != this->success.end(); ++_iter632) + std::vector ::const_iterator _iter633; + for (_iter633 = this->success.begin(); _iter633 != this->success.end(); ++_iter633) { - xfer += oprot->writeString((*_iter632)); + xfer += oprot->writeString((*_iter633)); } xfer += oprot->writeListEnd(); } @@ -11499,14 +11499,14 @@ uint32_t ThriftHiveMetastore_get_partition_names_ps_presult::read(::apache::thri if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size633; - ::apache::thrift::protocol::TType _etype636; - xfer += iprot->readListBegin(_etype636, _size633); - (*(this->success)).resize(_size633); - uint32_t _i637; - for (_i637 = 0; _i637 < _size633; ++_i637) + uint32_t _size634; + ::apache::thrift::protocol::TType _etype637; + xfer += iprot->readListBegin(_etype637, _size634); + (*(this->success)).resize(_size634); + uint32_t _i638; + for (_i638 = 0; _i638 < _size634; ++_i638) { - xfer += iprot->readString((*(this->success))[_i637]); + xfer += iprot->readString((*(this->success))[_i638]); } xfer += iprot->readListEnd(); } @@ -11681,14 +11681,14 @@ uint32_t ThriftHiveMetastore_get_partitions_by_filter_result::read(::apache::thr if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size638; - ::apache::thrift::protocol::TType _etype641; - xfer += iprot->readListBegin(_etype641, _size638); - this->success.resize(_size638); - uint32_t _i642; - for (_i642 = 0; _i642 < _size638; ++_i642) + uint32_t _size639; + ::apache::thrift::protocol::TType _etype642; + xfer += iprot->readListBegin(_etype642, _size639); + this->success.resize(_size639); + uint32_t _i643; + for (_i643 = 0; _i643 < _size639; ++_i643) { - xfer += this->success[_i642].read(iprot); + xfer += this->success[_i643].read(iprot); } xfer += iprot->readListEnd(); } @@ -11735,10 +11735,10 @@ uint32_t ThriftHiveMetastore_get_partitions_by_filter_result::write(::apache::th xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); - std::vector ::const_iterator _iter643; - for (_iter643 = this->success.begin(); _iter643 != this->success.end(); ++_iter643) + std::vector ::const_iterator _iter644; + for (_iter644 = this->success.begin(); _iter644 != this->success.end(); ++_iter644) { - xfer += (*_iter643).write(oprot); + xfer += (*_iter644).write(oprot); } xfer += oprot->writeListEnd(); } @@ -11781,14 +11781,14 @@ uint32_t ThriftHiveMetastore_get_partitions_by_filter_presult::read(::apache::th if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size644; - ::apache::thrift::protocol::TType _etype647; - xfer += iprot->readListBegin(_etype647, _size644); - (*(this->success)).resize(_size644); - uint32_t _i648; - for (_i648 = 0; _i648 < _size644; ++_i648) + uint32_t _size645; + ::apache::thrift::protocol::TType _etype648; + xfer += iprot->readListBegin(_etype648, _size645); + (*(this->success)).resize(_size645); + uint32_t _i649; + for (_i649 = 0; _i649 < _size645; ++_i649) { - xfer += (*(this->success))[_i648].read(iprot); + xfer += (*(this->success))[_i649].read(iprot); } xfer += iprot->readListEnd(); } @@ -12067,14 +12067,14 @@ uint32_t ThriftHiveMetastore_get_partitions_by_names_args::read(::apache::thrift if (ftype == ::apache::thrift::protocol::T_LIST) { { this->names.clear(); - uint32_t _size649; - ::apache::thrift::protocol::TType _etype652; - xfer += iprot->readListBegin(_etype652, _size649); - this->names.resize(_size649); - uint32_t _i653; - for (_i653 = 0; _i653 < _size649; ++_i653) + uint32_t _size650; + ::apache::thrift::protocol::TType _etype653; + xfer += iprot->readListBegin(_etype653, _size650); + this->names.resize(_size650); + uint32_t _i654; + for (_i654 = 0; _i654 < _size650; ++_i654) { - xfer += iprot->readString(this->names[_i653]); + xfer += iprot->readString(this->names[_i654]); } xfer += iprot->readListEnd(); } @@ -12110,10 +12110,10 @@ uint32_t ThriftHiveMetastore_get_partitions_by_names_args::write(::apache::thrif xfer += oprot->writeFieldBegin("names", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->names.size())); - std::vector ::const_iterator _iter654; - for (_iter654 = this->names.begin(); _iter654 != this->names.end(); ++_iter654) + std::vector ::const_iterator _iter655; + for (_iter655 = this->names.begin(); _iter655 != this->names.end(); ++_iter655) { - xfer += oprot->writeString((*_iter654)); + xfer += oprot->writeString((*_iter655)); } xfer += oprot->writeListEnd(); } @@ -12139,10 +12139,10 @@ uint32_t ThriftHiveMetastore_get_partitions_by_names_pargs::write(::apache::thri xfer += oprot->writeFieldBegin("names", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->names)).size())); - std::vector ::const_iterator _iter655; - for (_iter655 = (*(this->names)).begin(); _iter655 != (*(this->names)).end(); ++_iter655) + std::vector ::const_iterator _iter656; + for (_iter656 = (*(this->names)).begin(); _iter656 != (*(this->names)).end(); ++_iter656) { - xfer += oprot->writeString((*_iter655)); + xfer += oprot->writeString((*_iter656)); } xfer += oprot->writeListEnd(); } @@ -12177,14 +12177,14 @@ uint32_t ThriftHiveMetastore_get_partitions_by_names_result::read(::apache::thri if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size656; - ::apache::thrift::protocol::TType _etype659; - xfer += iprot->readListBegin(_etype659, _size656); - this->success.resize(_size656); - uint32_t _i660; - for (_i660 = 0; _i660 < _size656; ++_i660) + uint32_t _size657; + ::apache::thrift::protocol::TType _etype660; + xfer += iprot->readListBegin(_etype660, _size657); + this->success.resize(_size657); + uint32_t _i661; + for (_i661 = 0; _i661 < _size657; ++_i661) { - xfer += this->success[_i660].read(iprot); + xfer += this->success[_i661].read(iprot); } xfer += iprot->readListEnd(); } @@ -12231,10 +12231,10 @@ uint32_t ThriftHiveMetastore_get_partitions_by_names_result::write(::apache::thr xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); - std::vector ::const_iterator _iter661; - for (_iter661 = this->success.begin(); _iter661 != this->success.end(); ++_iter661) + std::vector ::const_iterator _iter662; + for (_iter662 = this->success.begin(); _iter662 != this->success.end(); ++_iter662) { - xfer += (*_iter661).write(oprot); + xfer += (*_iter662).write(oprot); } xfer += oprot->writeListEnd(); } @@ -12277,14 +12277,14 @@ uint32_t ThriftHiveMetastore_get_partitions_by_names_presult::read(::apache::thr if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size662; - ::apache::thrift::protocol::TType _etype665; - xfer += iprot->readListBegin(_etype665, _size662); - (*(this->success)).resize(_size662); - uint32_t _i666; - for (_i666 = 0; _i666 < _size662; ++_i666) + uint32_t _size663; + ::apache::thrift::protocol::TType _etype666; + xfer += iprot->readListBegin(_etype666, _size663); + (*(this->success)).resize(_size663); + uint32_t _i667; + for (_i667 = 0; _i667 < _size663; ++_i667) { - xfer += (*(this->success))[_i666].read(iprot); + xfer += (*(this->success))[_i667].read(iprot); } xfer += iprot->readListEnd(); } @@ -12575,14 +12575,14 @@ uint32_t ThriftHiveMetastore_alter_partitions_args::read(::apache::thrift::proto if (ftype == ::apache::thrift::protocol::T_LIST) { { this->new_parts.clear(); - uint32_t _size667; - ::apache::thrift::protocol::TType _etype670; - xfer += iprot->readListBegin(_etype670, _size667); - this->new_parts.resize(_size667); - uint32_t _i671; - for (_i671 = 0; _i671 < _size667; ++_i671) + uint32_t _size668; + ::apache::thrift::protocol::TType _etype671; + xfer += iprot->readListBegin(_etype671, _size668); + this->new_parts.resize(_size668); + uint32_t _i672; + for (_i672 = 0; _i672 < _size668; ++_i672) { - xfer += this->new_parts[_i671].read(iprot); + xfer += this->new_parts[_i672].read(iprot); } xfer += iprot->readListEnd(); } @@ -12618,10 +12618,10 @@ uint32_t ThriftHiveMetastore_alter_partitions_args::write(::apache::thrift::prot xfer += oprot->writeFieldBegin("new_parts", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->new_parts.size())); - std::vector ::const_iterator _iter672; - for (_iter672 = this->new_parts.begin(); _iter672 != this->new_parts.end(); ++_iter672) + std::vector ::const_iterator _iter673; + for (_iter673 = this->new_parts.begin(); _iter673 != this->new_parts.end(); ++_iter673) { - xfer += (*_iter672).write(oprot); + xfer += (*_iter673).write(oprot); } xfer += oprot->writeListEnd(); } @@ -12647,10 +12647,10 @@ uint32_t ThriftHiveMetastore_alter_partitions_pargs::write(::apache::thrift::pro xfer += oprot->writeFieldBegin("new_parts", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast((*(this->new_parts)).size())); - std::vector ::const_iterator _iter673; - for (_iter673 = (*(this->new_parts)).begin(); _iter673 != (*(this->new_parts)).end(); ++_iter673) + std::vector ::const_iterator _iter674; + for (_iter674 = (*(this->new_parts)).begin(); _iter674 != (*(this->new_parts)).end(); ++_iter674) { - xfer += (*_iter673).write(oprot); + xfer += (*_iter674).write(oprot); } xfer += oprot->writeListEnd(); } @@ -13047,14 +13047,14 @@ uint32_t ThriftHiveMetastore_rename_partition_args::read(::apache::thrift::proto if (ftype == ::apache::thrift::protocol::T_LIST) { { this->part_vals.clear(); - uint32_t _size674; - ::apache::thrift::protocol::TType _etype677; - xfer += iprot->readListBegin(_etype677, _size674); - this->part_vals.resize(_size674); - uint32_t _i678; - for (_i678 = 0; _i678 < _size674; ++_i678) + uint32_t _size675; + ::apache::thrift::protocol::TType _etype678; + xfer += iprot->readListBegin(_etype678, _size675); + this->part_vals.resize(_size675); + uint32_t _i679; + for (_i679 = 0; _i679 < _size675; ++_i679) { - xfer += iprot->readString(this->part_vals[_i678]); + xfer += iprot->readString(this->part_vals[_i679]); } xfer += iprot->readListEnd(); } @@ -13098,10 +13098,10 @@ uint32_t ThriftHiveMetastore_rename_partition_args::write(::apache::thrift::prot xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); - std::vector ::const_iterator _iter679; - for (_iter679 = this->part_vals.begin(); _iter679 != this->part_vals.end(); ++_iter679) + std::vector ::const_iterator _iter680; + for (_iter680 = this->part_vals.begin(); _iter680 != this->part_vals.end(); ++_iter680) { - xfer += oprot->writeString((*_iter679)); + xfer += oprot->writeString((*_iter680)); } xfer += oprot->writeListEnd(); } @@ -13131,10 +13131,10 @@ uint32_t ThriftHiveMetastore_rename_partition_pargs::write(::apache::thrift::pro xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); - std::vector ::const_iterator _iter680; - for (_iter680 = (*(this->part_vals)).begin(); _iter680 != (*(this->part_vals)).end(); ++_iter680) + std::vector ::const_iterator _iter681; + for (_iter681 = (*(this->part_vals)).begin(); _iter681 != (*(this->part_vals)).end(); ++_iter681) { - xfer += oprot->writeString((*_iter680)); + xfer += oprot->writeString((*_iter681)); } xfer += oprot->writeListEnd(); } @@ -13289,14 +13289,14 @@ uint32_t ThriftHiveMetastore_partition_name_has_valid_characters_args::read(::ap if (ftype == ::apache::thrift::protocol::T_LIST) { { this->part_vals.clear(); - uint32_t _size681; - ::apache::thrift::protocol::TType _etype684; - xfer += iprot->readListBegin(_etype684, _size681); - this->part_vals.resize(_size681); - uint32_t _i685; - for (_i685 = 0; _i685 < _size681; ++_i685) + uint32_t _size682; + ::apache::thrift::protocol::TType _etype685; + xfer += iprot->readListBegin(_etype685, _size682); + this->part_vals.resize(_size682); + uint32_t _i686; + for (_i686 = 0; _i686 < _size682; ++_i686) { - xfer += iprot->readString(this->part_vals[_i685]); + xfer += iprot->readString(this->part_vals[_i686]); } xfer += iprot->readListEnd(); } @@ -13332,10 +13332,10 @@ uint32_t ThriftHiveMetastore_partition_name_has_valid_characters_args::write(::a xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); - std::vector ::const_iterator _iter686; - for (_iter686 = this->part_vals.begin(); _iter686 != this->part_vals.end(); ++_iter686) + std::vector ::const_iterator _iter687; + for (_iter687 = this->part_vals.begin(); _iter687 != this->part_vals.end(); ++_iter687) { - xfer += oprot->writeString((*_iter686)); + xfer += oprot->writeString((*_iter687)); } xfer += oprot->writeListEnd(); } @@ -13357,10 +13357,10 @@ uint32_t ThriftHiveMetastore_partition_name_has_valid_characters_pargs::write(:: xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); - std::vector ::const_iterator _iter687; - for (_iter687 = (*(this->part_vals)).begin(); _iter687 != (*(this->part_vals)).end(); ++_iter687) + std::vector ::const_iterator _iter688; + for (_iter688 = (*(this->part_vals)).begin(); _iter688 != (*(this->part_vals)).end(); ++_iter688) { - xfer += oprot->writeString((*_iter687)); + xfer += oprot->writeString((*_iter688)); } xfer += oprot->writeListEnd(); } @@ -13779,14 +13779,14 @@ uint32_t ThriftHiveMetastore_partition_name_to_vals_result::read(::apache::thrif if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size688; - ::apache::thrift::protocol::TType _etype691; - xfer += iprot->readListBegin(_etype691, _size688); - this->success.resize(_size688); - uint32_t _i692; - for (_i692 = 0; _i692 < _size688; ++_i692) + uint32_t _size689; + ::apache::thrift::protocol::TType _etype692; + xfer += iprot->readListBegin(_etype692, _size689); + this->success.resize(_size689); + uint32_t _i693; + for (_i693 = 0; _i693 < _size689; ++_i693) { - xfer += iprot->readString(this->success[_i692]); + xfer += iprot->readString(this->success[_i693]); } xfer += iprot->readListEnd(); } @@ -13825,10 +13825,10 @@ uint32_t ThriftHiveMetastore_partition_name_to_vals_result::write(::apache::thri xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); - std::vector ::const_iterator _iter693; - for (_iter693 = this->success.begin(); _iter693 != this->success.end(); ++_iter693) + std::vector ::const_iterator _iter694; + for (_iter694 = this->success.begin(); _iter694 != this->success.end(); ++_iter694) { - xfer += oprot->writeString((*_iter693)); + xfer += oprot->writeString((*_iter694)); } xfer += oprot->writeListEnd(); } @@ -13867,14 +13867,14 @@ uint32_t ThriftHiveMetastore_partition_name_to_vals_presult::read(::apache::thri if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size694; - ::apache::thrift::protocol::TType _etype697; - xfer += iprot->readListBegin(_etype697, _size694); - (*(this->success)).resize(_size694); - uint32_t _i698; - for (_i698 = 0; _i698 < _size694; ++_i698) + uint32_t _size695; + ::apache::thrift::protocol::TType _etype698; + xfer += iprot->readListBegin(_etype698, _size695); + (*(this->success)).resize(_size695); + uint32_t _i699; + for (_i699 = 0; _i699 < _size695; ++_i699) { - xfer += iprot->readString((*(this->success))[_i698]); + xfer += iprot->readString((*(this->success))[_i699]); } xfer += iprot->readListEnd(); } @@ -13993,17 +13993,17 @@ uint32_t ThriftHiveMetastore_partition_name_to_spec_result::read(::apache::thrif if (ftype == ::apache::thrift::protocol::T_MAP) { { this->success.clear(); - uint32_t _size699; - ::apache::thrift::protocol::TType _ktype700; - ::apache::thrift::protocol::TType _vtype701; - xfer += iprot->readMapBegin(_ktype700, _vtype701, _size699); - uint32_t _i703; - for (_i703 = 0; _i703 < _size699; ++_i703) + uint32_t _size700; + ::apache::thrift::protocol::TType _ktype701; + ::apache::thrift::protocol::TType _vtype702; + xfer += iprot->readMapBegin(_ktype701, _vtype702, _size700); + uint32_t _i704; + for (_i704 = 0; _i704 < _size700; ++_i704) { - std::string _key704; - xfer += iprot->readString(_key704); - std::string& _val705 = this->success[_key704]; - xfer += iprot->readString(_val705); + std::string _key705; + xfer += iprot->readString(_key705); + std::string& _val706 = this->success[_key705]; + xfer += iprot->readString(_val706); } xfer += iprot->readMapEnd(); } @@ -14042,11 +14042,11 @@ uint32_t ThriftHiveMetastore_partition_name_to_spec_result::write(::apache::thri xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_MAP, 0); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); - std::map ::const_iterator _iter706; - for (_iter706 = this->success.begin(); _iter706 != this->success.end(); ++_iter706) + std::map ::const_iterator _iter707; + for (_iter707 = this->success.begin(); _iter707 != this->success.end(); ++_iter707) { - xfer += oprot->writeString(_iter706->first); - xfer += oprot->writeString(_iter706->second); + xfer += oprot->writeString(_iter707->first); + xfer += oprot->writeString(_iter707->second); } xfer += oprot->writeMapEnd(); } @@ -14085,17 +14085,17 @@ uint32_t ThriftHiveMetastore_partition_name_to_spec_presult::read(::apache::thri if (ftype == ::apache::thrift::protocol::T_MAP) { { (*(this->success)).clear(); - uint32_t _size707; - ::apache::thrift::protocol::TType _ktype708; - ::apache::thrift::protocol::TType _vtype709; - xfer += iprot->readMapBegin(_ktype708, _vtype709, _size707); - uint32_t _i711; - for (_i711 = 0; _i711 < _size707; ++_i711) + uint32_t _size708; + ::apache::thrift::protocol::TType _ktype709; + ::apache::thrift::protocol::TType _vtype710; + xfer += iprot->readMapBegin(_ktype709, _vtype710, _size708); + uint32_t _i712; + for (_i712 = 0; _i712 < _size708; ++_i712) { - std::string _key712; - xfer += iprot->readString(_key712); - std::string& _val713 = (*(this->success))[_key712]; - xfer += iprot->readString(_val713); + std::string _key713; + xfer += iprot->readString(_key713); + std::string& _val714 = (*(this->success))[_key713]; + xfer += iprot->readString(_val714); } xfer += iprot->readMapEnd(); } @@ -14164,17 +14164,17 @@ uint32_t ThriftHiveMetastore_markPartitionForEvent_args::read(::apache::thrift:: if (ftype == ::apache::thrift::protocol::T_MAP) { { this->part_vals.clear(); - uint32_t _size714; - ::apache::thrift::protocol::TType _ktype715; - ::apache::thrift::protocol::TType _vtype716; - xfer += iprot->readMapBegin(_ktype715, _vtype716, _size714); - uint32_t _i718; - for (_i718 = 0; _i718 < _size714; ++_i718) + uint32_t _size715; + ::apache::thrift::protocol::TType _ktype716; + ::apache::thrift::protocol::TType _vtype717; + xfer += iprot->readMapBegin(_ktype716, _vtype717, _size715); + uint32_t _i719; + for (_i719 = 0; _i719 < _size715; ++_i719) { - std::string _key719; - xfer += iprot->readString(_key719); - std::string& _val720 = this->part_vals[_key719]; - xfer += iprot->readString(_val720); + std::string _key720; + xfer += iprot->readString(_key720); + std::string& _val721 = this->part_vals[_key720]; + xfer += iprot->readString(_val721); } xfer += iprot->readMapEnd(); } @@ -14185,9 +14185,9 @@ uint32_t ThriftHiveMetastore_markPartitionForEvent_args::read(::apache::thrift:: break; case 4: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast721; - xfer += iprot->readI32(ecast721); - this->eventType = (PartitionEventType::type)ecast721; + int32_t ecast722; + xfer += iprot->readI32(ecast722); + this->eventType = (PartitionEventType::type)ecast722; this->__isset.eventType = true; } else { xfer += iprot->skip(ftype); @@ -14220,11 +14220,11 @@ uint32_t ThriftHiveMetastore_markPartitionForEvent_args::write(::apache::thrift: xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_MAP, 3); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); - std::map ::const_iterator _iter722; - for (_iter722 = this->part_vals.begin(); _iter722 != this->part_vals.end(); ++_iter722) + std::map ::const_iterator _iter723; + for (_iter723 = this->part_vals.begin(); _iter723 != this->part_vals.end(); ++_iter723) { - xfer += oprot->writeString(_iter722->first); - xfer += oprot->writeString(_iter722->second); + xfer += oprot->writeString(_iter723->first); + xfer += oprot->writeString(_iter723->second); } xfer += oprot->writeMapEnd(); } @@ -14254,11 +14254,11 @@ uint32_t ThriftHiveMetastore_markPartitionForEvent_pargs::write(::apache::thrift xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_MAP, 3); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); - std::map ::const_iterator _iter723; - for (_iter723 = (*(this->part_vals)).begin(); _iter723 != (*(this->part_vals)).end(); ++_iter723) + std::map ::const_iterator _iter724; + for (_iter724 = (*(this->part_vals)).begin(); _iter724 != (*(this->part_vals)).end(); ++_iter724) { - xfer += oprot->writeString(_iter723->first); - xfer += oprot->writeString(_iter723->second); + xfer += oprot->writeString(_iter724->first); + xfer += oprot->writeString(_iter724->second); } xfer += oprot->writeMapEnd(); } @@ -14509,17 +14509,17 @@ uint32_t ThriftHiveMetastore_isPartitionMarkedForEvent_args::read(::apache::thri if (ftype == ::apache::thrift::protocol::T_MAP) { { this->part_vals.clear(); - uint32_t _size724; - ::apache::thrift::protocol::TType _ktype725; - ::apache::thrift::protocol::TType _vtype726; - xfer += iprot->readMapBegin(_ktype725, _vtype726, _size724); - uint32_t _i728; - for (_i728 = 0; _i728 < _size724; ++_i728) + uint32_t _size725; + ::apache::thrift::protocol::TType _ktype726; + ::apache::thrift::protocol::TType _vtype727; + xfer += iprot->readMapBegin(_ktype726, _vtype727, _size725); + uint32_t _i729; + for (_i729 = 0; _i729 < _size725; ++_i729) { - std::string _key729; - xfer += iprot->readString(_key729); - std::string& _val730 = this->part_vals[_key729]; - xfer += iprot->readString(_val730); + std::string _key730; + xfer += iprot->readString(_key730); + std::string& _val731 = this->part_vals[_key730]; + xfer += iprot->readString(_val731); } xfer += iprot->readMapEnd(); } @@ -14530,9 +14530,9 @@ uint32_t ThriftHiveMetastore_isPartitionMarkedForEvent_args::read(::apache::thri break; case 4: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast731; - xfer += iprot->readI32(ecast731); - this->eventType = (PartitionEventType::type)ecast731; + int32_t ecast732; + xfer += iprot->readI32(ecast732); + this->eventType = (PartitionEventType::type)ecast732; this->__isset.eventType = true; } else { xfer += iprot->skip(ftype); @@ -14565,11 +14565,11 @@ uint32_t ThriftHiveMetastore_isPartitionMarkedForEvent_args::write(::apache::thr xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_MAP, 3); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); - std::map ::const_iterator _iter732; - for (_iter732 = this->part_vals.begin(); _iter732 != this->part_vals.end(); ++_iter732) + std::map ::const_iterator _iter733; + for (_iter733 = this->part_vals.begin(); _iter733 != this->part_vals.end(); ++_iter733) { - xfer += oprot->writeString(_iter732->first); - xfer += oprot->writeString(_iter732->second); + xfer += oprot->writeString(_iter733->first); + xfer += oprot->writeString(_iter733->second); } xfer += oprot->writeMapEnd(); } @@ -14599,11 +14599,11 @@ uint32_t ThriftHiveMetastore_isPartitionMarkedForEvent_pargs::write(::apache::th xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_MAP, 3); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); - std::map ::const_iterator _iter733; - for (_iter733 = (*(this->part_vals)).begin(); _iter733 != (*(this->part_vals)).end(); ++_iter733) + std::map ::const_iterator _iter734; + for (_iter734 = (*(this->part_vals)).begin(); _iter734 != (*(this->part_vals)).end(); ++_iter734) { - xfer += oprot->writeString(_iter733->first); - xfer += oprot->writeString(_iter733->second); + xfer += oprot->writeString(_iter734->first); + xfer += oprot->writeString(_iter734->second); } xfer += oprot->writeMapEnd(); } @@ -15908,14 +15908,14 @@ uint32_t ThriftHiveMetastore_get_indexes_result::read(::apache::thrift::protocol if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size734; - ::apache::thrift::protocol::TType _etype737; - xfer += iprot->readListBegin(_etype737, _size734); - this->success.resize(_size734); - uint32_t _i738; - for (_i738 = 0; _i738 < _size734; ++_i738) + uint32_t _size735; + ::apache::thrift::protocol::TType _etype738; + xfer += iprot->readListBegin(_etype738, _size735); + this->success.resize(_size735); + uint32_t _i739; + for (_i739 = 0; _i739 < _size735; ++_i739) { - xfer += this->success[_i738].read(iprot); + xfer += this->success[_i739].read(iprot); } xfer += iprot->readListEnd(); } @@ -15962,10 +15962,10 @@ uint32_t ThriftHiveMetastore_get_indexes_result::write(::apache::thrift::protoco xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); - std::vector ::const_iterator _iter739; - for (_iter739 = this->success.begin(); _iter739 != this->success.end(); ++_iter739) + std::vector ::const_iterator _iter740; + for (_iter740 = this->success.begin(); _iter740 != this->success.end(); ++_iter740) { - xfer += (*_iter739).write(oprot); + xfer += (*_iter740).write(oprot); } xfer += oprot->writeListEnd(); } @@ -16008,14 +16008,14 @@ uint32_t ThriftHiveMetastore_get_indexes_presult::read(::apache::thrift::protoco if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size740; - ::apache::thrift::protocol::TType _etype743; - xfer += iprot->readListBegin(_etype743, _size740); - (*(this->success)).resize(_size740); - uint32_t _i744; - for (_i744 = 0; _i744 < _size740; ++_i744) + uint32_t _size741; + ::apache::thrift::protocol::TType _etype744; + xfer += iprot->readListBegin(_etype744, _size741); + (*(this->success)).resize(_size741); + uint32_t _i745; + for (_i745 = 0; _i745 < _size741; ++_i745) { - xfer += (*(this->success))[_i744].read(iprot); + xfer += (*(this->success))[_i745].read(iprot); } xfer += iprot->readListEnd(); } @@ -16174,14 +16174,14 @@ uint32_t ThriftHiveMetastore_get_index_names_result::read(::apache::thrift::prot if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size745; - ::apache::thrift::protocol::TType _etype748; - xfer += iprot->readListBegin(_etype748, _size745); - this->success.resize(_size745); - uint32_t _i749; - for (_i749 = 0; _i749 < _size745; ++_i749) + uint32_t _size746; + ::apache::thrift::protocol::TType _etype749; + xfer += iprot->readListBegin(_etype749, _size746); + this->success.resize(_size746); + uint32_t _i750; + for (_i750 = 0; _i750 < _size746; ++_i750) { - xfer += iprot->readString(this->success[_i749]); + xfer += iprot->readString(this->success[_i750]); } xfer += iprot->readListEnd(); } @@ -16220,10 +16220,10 @@ uint32_t ThriftHiveMetastore_get_index_names_result::write(::apache::thrift::pro xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); - std::vector ::const_iterator _iter750; - for (_iter750 = this->success.begin(); _iter750 != this->success.end(); ++_iter750) + std::vector ::const_iterator _iter751; + for (_iter751 = this->success.begin(); _iter751 != this->success.end(); ++_iter751) { - xfer += oprot->writeString((*_iter750)); + xfer += oprot->writeString((*_iter751)); } xfer += oprot->writeListEnd(); } @@ -16262,14 +16262,14 @@ uint32_t ThriftHiveMetastore_get_index_names_presult::read(::apache::thrift::pro if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size751; - ::apache::thrift::protocol::TType _etype754; - xfer += iprot->readListBegin(_etype754, _size751); - (*(this->success)).resize(_size751); - uint32_t _i755; - for (_i755 = 0; _i755 < _size751; ++_i755) + uint32_t _size752; + ::apache::thrift::protocol::TType _etype755; + xfer += iprot->readListBegin(_etype755, _size752); + (*(this->success)).resize(_size752); + uint32_t _i756; + for (_i756 = 0; _i756 < _size752; ++_i756) { - xfer += iprot->readString((*(this->success))[_i755]); + xfer += iprot->readString((*(this->success))[_i756]); } xfer += iprot->readListEnd(); } @@ -19054,14 +19054,14 @@ uint32_t ThriftHiveMetastore_get_functions_result::read(::apache::thrift::protoc if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size756; - ::apache::thrift::protocol::TType _etype759; - xfer += iprot->readListBegin(_etype759, _size756); - this->success.resize(_size756); - uint32_t _i760; - for (_i760 = 0; _i760 < _size756; ++_i760) + uint32_t _size757; + ::apache::thrift::protocol::TType _etype760; + xfer += iprot->readListBegin(_etype760, _size757); + this->success.resize(_size757); + uint32_t _i761; + for (_i761 = 0; _i761 < _size757; ++_i761) { - xfer += iprot->readString(this->success[_i760]); + xfer += iprot->readString(this->success[_i761]); } xfer += iprot->readListEnd(); } @@ -19100,10 +19100,10 @@ uint32_t ThriftHiveMetastore_get_functions_result::write(::apache::thrift::proto xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); - std::vector ::const_iterator _iter761; - for (_iter761 = this->success.begin(); _iter761 != this->success.end(); ++_iter761) + std::vector ::const_iterator _iter762; + for (_iter762 = this->success.begin(); _iter762 != this->success.end(); ++_iter762) { - xfer += oprot->writeString((*_iter761)); + xfer += oprot->writeString((*_iter762)); } xfer += oprot->writeListEnd(); } @@ -19142,14 +19142,14 @@ uint32_t ThriftHiveMetastore_get_functions_presult::read(::apache::thrift::proto if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size762; - ::apache::thrift::protocol::TType _etype765; - xfer += iprot->readListBegin(_etype765, _size762); - (*(this->success)).resize(_size762); - uint32_t _i766; - for (_i766 = 0; _i766 < _size762; ++_i766) + uint32_t _size763; + ::apache::thrift::protocol::TType _etype766; + xfer += iprot->readListBegin(_etype766, _size763); + (*(this->success)).resize(_size763); + uint32_t _i767; + for (_i767 = 0; _i767 < _size763; ++_i767) { - xfer += iprot->readString((*(this->success))[_i766]); + xfer += iprot->readString((*(this->success))[_i767]); } xfer += iprot->readListEnd(); } @@ -19829,14 +19829,14 @@ uint32_t ThriftHiveMetastore_get_role_names_result::read(::apache::thrift::proto if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size767; - ::apache::thrift::protocol::TType _etype770; - xfer += iprot->readListBegin(_etype770, _size767); - this->success.resize(_size767); - uint32_t _i771; - for (_i771 = 0; _i771 < _size767; ++_i771) + uint32_t _size768; + ::apache::thrift::protocol::TType _etype771; + xfer += iprot->readListBegin(_etype771, _size768); + this->success.resize(_size768); + uint32_t _i772; + for (_i772 = 0; _i772 < _size768; ++_i772) { - xfer += iprot->readString(this->success[_i771]); + xfer += iprot->readString(this->success[_i772]); } xfer += iprot->readListEnd(); } @@ -19875,10 +19875,10 @@ uint32_t ThriftHiveMetastore_get_role_names_result::write(::apache::thrift::prot xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); - std::vector ::const_iterator _iter772; - for (_iter772 = this->success.begin(); _iter772 != this->success.end(); ++_iter772) + std::vector ::const_iterator _iter773; + for (_iter773 = this->success.begin(); _iter773 != this->success.end(); ++_iter773) { - xfer += oprot->writeString((*_iter772)); + xfer += oprot->writeString((*_iter773)); } xfer += oprot->writeListEnd(); } @@ -19917,14 +19917,14 @@ uint32_t ThriftHiveMetastore_get_role_names_presult::read(::apache::thrift::prot if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size773; - ::apache::thrift::protocol::TType _etype776; - xfer += iprot->readListBegin(_etype776, _size773); - (*(this->success)).resize(_size773); - uint32_t _i777; - for (_i777 = 0; _i777 < _size773; ++_i777) + uint32_t _size774; + ::apache::thrift::protocol::TType _etype777; + xfer += iprot->readListBegin(_etype777, _size774); + (*(this->success)).resize(_size774); + uint32_t _i778; + for (_i778 = 0; _i778 < _size774; ++_i778) { - xfer += iprot->readString((*(this->success))[_i777]); + xfer += iprot->readString((*(this->success))[_i778]); } xfer += iprot->readListEnd(); } @@ -19991,9 +19991,9 @@ uint32_t ThriftHiveMetastore_grant_role_args::read(::apache::thrift::protocol::T break; case 3: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast778; - xfer += iprot->readI32(ecast778); - this->principal_type = (PrincipalType::type)ecast778; + int32_t ecast779; + xfer += iprot->readI32(ecast779); + this->principal_type = (PrincipalType::type)ecast779; this->__isset.principal_type = true; } else { xfer += iprot->skip(ftype); @@ -20009,9 +20009,9 @@ uint32_t ThriftHiveMetastore_grant_role_args::read(::apache::thrift::protocol::T break; case 5: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast779; - xfer += iprot->readI32(ecast779); - this->grantorType = (PrincipalType::type)ecast779; + int32_t ecast780; + xfer += iprot->readI32(ecast780); + this->grantorType = (PrincipalType::type)ecast780; this->__isset.grantorType = true; } else { xfer += iprot->skip(ftype); @@ -20257,9 +20257,9 @@ uint32_t ThriftHiveMetastore_revoke_role_args::read(::apache::thrift::protocol:: break; case 3: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast780; - xfer += iprot->readI32(ecast780); - this->principal_type = (PrincipalType::type)ecast780; + int32_t ecast781; + xfer += iprot->readI32(ecast781); + this->principal_type = (PrincipalType::type)ecast781; this->__isset.principal_type = true; } else { xfer += iprot->skip(ftype); @@ -20465,9 +20465,9 @@ uint32_t ThriftHiveMetastore_list_roles_args::read(::apache::thrift::protocol::T break; case 2: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast781; - xfer += iprot->readI32(ecast781); - this->principal_type = (PrincipalType::type)ecast781; + int32_t ecast782; + xfer += iprot->readI32(ecast782); + this->principal_type = (PrincipalType::type)ecast782; this->__isset.principal_type = true; } else { xfer += iprot->skip(ftype); @@ -20543,14 +20543,14 @@ uint32_t ThriftHiveMetastore_list_roles_result::read(::apache::thrift::protocol: if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size782; - ::apache::thrift::protocol::TType _etype785; - xfer += iprot->readListBegin(_etype785, _size782); - this->success.resize(_size782); - uint32_t _i786; - for (_i786 = 0; _i786 < _size782; ++_i786) + uint32_t _size783; + ::apache::thrift::protocol::TType _etype786; + xfer += iprot->readListBegin(_etype786, _size783); + this->success.resize(_size783); + uint32_t _i787; + for (_i787 = 0; _i787 < _size783; ++_i787) { - xfer += this->success[_i786].read(iprot); + xfer += this->success[_i787].read(iprot); } xfer += iprot->readListEnd(); } @@ -20589,10 +20589,10 @@ uint32_t ThriftHiveMetastore_list_roles_result::write(::apache::thrift::protocol xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); - std::vector ::const_iterator _iter787; - for (_iter787 = this->success.begin(); _iter787 != this->success.end(); ++_iter787) + std::vector ::const_iterator _iter788; + for (_iter788 = this->success.begin(); _iter788 != this->success.end(); ++_iter788) { - xfer += (*_iter787).write(oprot); + xfer += (*_iter788).write(oprot); } xfer += oprot->writeListEnd(); } @@ -20631,14 +20631,14 @@ uint32_t ThriftHiveMetastore_list_roles_presult::read(::apache::thrift::protocol if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size788; - ::apache::thrift::protocol::TType _etype791; - xfer += iprot->readListBegin(_etype791, _size788); - (*(this->success)).resize(_size788); - uint32_t _i792; - for (_i792 = 0; _i792 < _size788; ++_i792) + uint32_t _size789; + ::apache::thrift::protocol::TType _etype792; + xfer += iprot->readListBegin(_etype792, _size789); + (*(this->success)).resize(_size789); + uint32_t _i793; + for (_i793 = 0; _i793 < _size789; ++_i793) { - xfer += (*(this->success))[_i792].read(iprot); + xfer += (*(this->success))[_i793].read(iprot); } xfer += iprot->readListEnd(); } @@ -21253,14 +21253,14 @@ uint32_t ThriftHiveMetastore_get_privilege_set_args::read(::apache::thrift::prot if (ftype == ::apache::thrift::protocol::T_LIST) { { this->group_names.clear(); - uint32_t _size793; - ::apache::thrift::protocol::TType _etype796; - xfer += iprot->readListBegin(_etype796, _size793); - this->group_names.resize(_size793); - uint32_t _i797; - for (_i797 = 0; _i797 < _size793; ++_i797) + uint32_t _size794; + ::apache::thrift::protocol::TType _etype797; + xfer += iprot->readListBegin(_etype797, _size794); + this->group_names.resize(_size794); + uint32_t _i798; + for (_i798 = 0; _i798 < _size794; ++_i798) { - xfer += iprot->readString(this->group_names[_i797]); + xfer += iprot->readString(this->group_names[_i798]); } xfer += iprot->readListEnd(); } @@ -21296,10 +21296,10 @@ uint32_t ThriftHiveMetastore_get_privilege_set_args::write(::apache::thrift::pro xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->group_names.size())); - std::vector ::const_iterator _iter798; - for (_iter798 = this->group_names.begin(); _iter798 != this->group_names.end(); ++_iter798) + std::vector ::const_iterator _iter799; + for (_iter799 = this->group_names.begin(); _iter799 != this->group_names.end(); ++_iter799) { - xfer += oprot->writeString((*_iter798)); + xfer += oprot->writeString((*_iter799)); } xfer += oprot->writeListEnd(); } @@ -21325,10 +21325,10 @@ uint32_t ThriftHiveMetastore_get_privilege_set_pargs::write(::apache::thrift::pr xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->group_names)).size())); - std::vector ::const_iterator _iter799; - for (_iter799 = (*(this->group_names)).begin(); _iter799 != (*(this->group_names)).end(); ++_iter799) + std::vector ::const_iterator _iter800; + for (_iter800 = (*(this->group_names)).begin(); _iter800 != (*(this->group_names)).end(); ++_iter800) { - xfer += oprot->writeString((*_iter799)); + xfer += oprot->writeString((*_iter800)); } xfer += oprot->writeListEnd(); } @@ -21485,9 +21485,9 @@ uint32_t ThriftHiveMetastore_list_privileges_args::read(::apache::thrift::protoc break; case 2: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast800; - xfer += iprot->readI32(ecast800); - this->principal_type = (PrincipalType::type)ecast800; + int32_t ecast801; + xfer += iprot->readI32(ecast801); + this->principal_type = (PrincipalType::type)ecast801; this->__isset.principal_type = true; } else { xfer += iprot->skip(ftype); @@ -21579,14 +21579,14 @@ uint32_t ThriftHiveMetastore_list_privileges_result::read(::apache::thrift::prot if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size801; - ::apache::thrift::protocol::TType _etype804; - xfer += iprot->readListBegin(_etype804, _size801); - this->success.resize(_size801); - uint32_t _i805; - for (_i805 = 0; _i805 < _size801; ++_i805) + uint32_t _size802; + ::apache::thrift::protocol::TType _etype805; + xfer += iprot->readListBegin(_etype805, _size802); + this->success.resize(_size802); + uint32_t _i806; + for (_i806 = 0; _i806 < _size802; ++_i806) { - xfer += this->success[_i805].read(iprot); + xfer += this->success[_i806].read(iprot); } xfer += iprot->readListEnd(); } @@ -21625,10 +21625,10 @@ uint32_t ThriftHiveMetastore_list_privileges_result::write(::apache::thrift::pro xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); - std::vector ::const_iterator _iter806; - for (_iter806 = this->success.begin(); _iter806 != this->success.end(); ++_iter806) + std::vector ::const_iterator _iter807; + for (_iter807 = this->success.begin(); _iter807 != this->success.end(); ++_iter807) { - xfer += (*_iter806).write(oprot); + xfer += (*_iter807).write(oprot); } xfer += oprot->writeListEnd(); } @@ -21667,14 +21667,14 @@ uint32_t ThriftHiveMetastore_list_privileges_presult::read(::apache::thrift::pro if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size807; - ::apache::thrift::protocol::TType _etype810; - xfer += iprot->readListBegin(_etype810, _size807); - (*(this->success)).resize(_size807); - uint32_t _i811; - for (_i811 = 0; _i811 < _size807; ++_i811) + uint32_t _size808; + ::apache::thrift::protocol::TType _etype811; + xfer += iprot->readListBegin(_etype811, _size808); + (*(this->success)).resize(_size808); + uint32_t _i812; + for (_i812 = 0; _i812 < _size808; ++_i812) { - xfer += (*(this->success))[_i811].read(iprot); + xfer += (*(this->success))[_i812].read(iprot); } xfer += iprot->readListEnd(); } @@ -22067,6 +22067,188 @@ uint32_t ThriftHiveMetastore_revoke_privileges_presult::read(::apache::thrift::p return xfer; } +uint32_t ThriftHiveMetastore_grant_revoke_privileges_args::read(::apache::thrift::protocol::TProtocol* 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_STRUCT) { + xfer += this->request.read(iprot); + this->__isset.request = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_grant_revoke_privileges_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_revoke_privileges_args"); + + xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->request.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_grant_revoke_privileges_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_revoke_privileges_pargs"); + + xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->request)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_grant_revoke_privileges_result::read(::apache::thrift::protocol::TProtocol* 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 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_grant_revoke_privileges_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_revoke_privileges_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_grant_revoke_privileges_presult::read(::apache::thrift::protocol::TProtocol* 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 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + uint32_t ThriftHiveMetastore_set_ugi_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; @@ -22099,14 +22281,14 @@ uint32_t ThriftHiveMetastore_set_ugi_args::read(::apache::thrift::protocol::TPro if (ftype == ::apache::thrift::protocol::T_LIST) { { this->group_names.clear(); - uint32_t _size812; - ::apache::thrift::protocol::TType _etype815; - xfer += iprot->readListBegin(_etype815, _size812); - this->group_names.resize(_size812); - uint32_t _i816; - for (_i816 = 0; _i816 < _size812; ++_i816) + uint32_t _size813; + ::apache::thrift::protocol::TType _etype816; + xfer += iprot->readListBegin(_etype816, _size813); + this->group_names.resize(_size813); + uint32_t _i817; + for (_i817 = 0; _i817 < _size813; ++_i817) { - xfer += iprot->readString(this->group_names[_i816]); + xfer += iprot->readString(this->group_names[_i817]); } xfer += iprot->readListEnd(); } @@ -22138,10 +22320,10 @@ uint32_t ThriftHiveMetastore_set_ugi_args::write(::apache::thrift::protocol::TPr xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 2); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->group_names.size())); - std::vector ::const_iterator _iter817; - for (_iter817 = this->group_names.begin(); _iter817 != this->group_names.end(); ++_iter817) + std::vector ::const_iterator _iter818; + for (_iter818 = this->group_names.begin(); _iter818 != this->group_names.end(); ++_iter818) { - xfer += oprot->writeString((*_iter817)); + xfer += oprot->writeString((*_iter818)); } xfer += oprot->writeListEnd(); } @@ -22163,10 +22345,10 @@ uint32_t ThriftHiveMetastore_set_ugi_pargs::write(::apache::thrift::protocol::TP xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 2); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->group_names)).size())); - std::vector ::const_iterator _iter818; - for (_iter818 = (*(this->group_names)).begin(); _iter818 != (*(this->group_names)).end(); ++_iter818) + std::vector ::const_iterator _iter819; + for (_iter819 = (*(this->group_names)).begin(); _iter819 != (*(this->group_names)).end(); ++_iter819) { - xfer += oprot->writeString((*_iter818)); + xfer += oprot->writeString((*_iter819)); } xfer += oprot->writeListEnd(); } @@ -22201,14 +22383,14 @@ uint32_t ThriftHiveMetastore_set_ugi_result::read(::apache::thrift::protocol::TP if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size819; - ::apache::thrift::protocol::TType _etype822; - xfer += iprot->readListBegin(_etype822, _size819); - this->success.resize(_size819); - uint32_t _i823; - for (_i823 = 0; _i823 < _size819; ++_i823) + uint32_t _size820; + ::apache::thrift::protocol::TType _etype823; + xfer += iprot->readListBegin(_etype823, _size820); + this->success.resize(_size820); + uint32_t _i824; + for (_i824 = 0; _i824 < _size820; ++_i824) { - xfer += iprot->readString(this->success[_i823]); + xfer += iprot->readString(this->success[_i824]); } xfer += iprot->readListEnd(); } @@ -22247,10 +22429,10 @@ uint32_t ThriftHiveMetastore_set_ugi_result::write(::apache::thrift::protocol::T xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); - std::vector ::const_iterator _iter824; - for (_iter824 = this->success.begin(); _iter824 != this->success.end(); ++_iter824) + std::vector ::const_iterator _iter825; + for (_iter825 = this->success.begin(); _iter825 != this->success.end(); ++_iter825) { - xfer += oprot->writeString((*_iter824)); + xfer += oprot->writeString((*_iter825)); } xfer += oprot->writeListEnd(); } @@ -22289,14 +22471,14 @@ uint32_t ThriftHiveMetastore_set_ugi_presult::read(::apache::thrift::protocol::T if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size825; - ::apache::thrift::protocol::TType _etype828; - xfer += iprot->readListBegin(_etype828, _size825); - (*(this->success)).resize(_size825); - uint32_t _i829; - for (_i829 = 0; _i829 < _size825; ++_i829) + uint32_t _size826; + ::apache::thrift::protocol::TType _etype829; + xfer += iprot->readListBegin(_etype829, _size826); + (*(this->success)).resize(_size826); + uint32_t _i830; + for (_i830 = 0; _i830 < _size826; ++_i830) { - xfer += iprot->readString((*(this->success))[_i829]); + xfer += iprot->readString((*(this->success))[_i830]); } xfer += iprot->readListEnd(); } @@ -31009,6 +31191,67 @@ bool ThriftHiveMetastoreClient::recv_revoke_privileges() throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "revoke_privileges failed: unknown result"); } +void ThriftHiveMetastoreClient::grant_revoke_privileges(GrantRevokePrivilegeResponse& _return, const GrantRevokePrivilegeRequest& request) +{ + send_grant_revoke_privileges(request); + recv_grant_revoke_privileges(_return); +} + +void ThriftHiveMetastoreClient::send_grant_revoke_privileges(const GrantRevokePrivilegeRequest& request) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("grant_revoke_privileges", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_grant_revoke_privileges_pargs args; + args.request = &request; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_grant_revoke_privileges(GrantRevokePrivilegeResponse& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("grant_revoke_privileges") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_grant_revoke_privileges_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "grant_revoke_privileges failed: unknown result"); +} + void ThriftHiveMetastoreClient::set_ugi(std::vector & _return, const std::string& user_name, const std::vector & group_names) { send_set_ugi(user_name, group_names); @@ -37525,6 +37768,63 @@ void ThriftHiveMetastoreProcessor::process_revoke_privileges(int32_t seqid, ::ap } } +void ThriftHiveMetastoreProcessor::process_grant_revoke_privileges(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.grant_revoke_privileges", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.grant_revoke_privileges"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.grant_revoke_privileges"); + } + + ThriftHiveMetastore_grant_revoke_privileges_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.grant_revoke_privileges", bytes); + } + + ThriftHiveMetastore_grant_revoke_privileges_result result; + try { + iface_->grant_revoke_privileges(result.success, args.request); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.grant_revoke_privileges"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("grant_revoke_privileges", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.grant_revoke_privileges"); + } + + oprot->writeMessageBegin("grant_revoke_privileges", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.grant_revoke_privileges", bytes); + } +} + void ThriftHiveMetastoreProcessor::process_set_ugi(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; diff --git metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h index 11c64ab..3b778ee 100644 --- metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h +++ metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h @@ -107,6 +107,7 @@ class ThriftHiveMetastoreIf : virtual public ::facebook::fb303::FacebookService virtual void list_privileges(std::vector & _return, const std::string& principal_name, const PrincipalType::type principal_type, const HiveObjectRef& hiveObject) = 0; virtual bool grant_privileges(const PrivilegeBag& privileges) = 0; virtual bool revoke_privileges(const PrivilegeBag& privileges) = 0; + virtual void grant_revoke_privileges(GrantRevokePrivilegeResponse& _return, const GrantRevokePrivilegeRequest& request) = 0; virtual void set_ugi(std::vector & _return, const std::string& user_name, const std::vector & group_names) = 0; virtual void get_delegation_token(std::string& _return, const std::string& token_owner, const std::string& renewer_kerberos_principal_name) = 0; virtual int64_t renew_delegation_token(const std::string& token_str_form) = 0; @@ -446,6 +447,9 @@ class ThriftHiveMetastoreNull : virtual public ThriftHiveMetastoreIf , virtual p bool _return = false; return _return; } + void grant_revoke_privileges(GrantRevokePrivilegeResponse& /* _return */, const GrantRevokePrivilegeRequest& /* request */) { + return; + } void set_ugi(std::vector & /* _return */, const std::string& /* user_name */, const std::vector & /* group_names */) { return; } @@ -13390,6 +13394,124 @@ class ThriftHiveMetastore_revoke_privileges_presult { }; +typedef struct _ThriftHiveMetastore_grant_revoke_privileges_args__isset { + _ThriftHiveMetastore_grant_revoke_privileges_args__isset() : request(false) {} + bool request; +} _ThriftHiveMetastore_grant_revoke_privileges_args__isset; + +class ThriftHiveMetastore_grant_revoke_privileges_args { + public: + + ThriftHiveMetastore_grant_revoke_privileges_args() { + } + + virtual ~ThriftHiveMetastore_grant_revoke_privileges_args() throw() {} + + GrantRevokePrivilegeRequest request; + + _ThriftHiveMetastore_grant_revoke_privileges_args__isset __isset; + + void __set_request(const GrantRevokePrivilegeRequest& val) { + request = val; + } + + bool operator == (const ThriftHiveMetastore_grant_revoke_privileges_args & rhs) const + { + if (!(request == rhs.request)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_grant_revoke_privileges_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_grant_revoke_privileges_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_grant_revoke_privileges_pargs { + public: + + + virtual ~ThriftHiveMetastore_grant_revoke_privileges_pargs() throw() {} + + const GrantRevokePrivilegeRequest* request; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_grant_revoke_privileges_result__isset { + _ThriftHiveMetastore_grant_revoke_privileges_result__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_grant_revoke_privileges_result__isset; + +class ThriftHiveMetastore_grant_revoke_privileges_result { + public: + + ThriftHiveMetastore_grant_revoke_privileges_result() { + } + + virtual ~ThriftHiveMetastore_grant_revoke_privileges_result() throw() {} + + GrantRevokePrivilegeResponse success; + MetaException o1; + + _ThriftHiveMetastore_grant_revoke_privileges_result__isset __isset; + + void __set_success(const GrantRevokePrivilegeResponse& val) { + success = val; + } + + void __set_o1(const MetaException& val) { + o1 = val; + } + + bool operator == (const ThriftHiveMetastore_grant_revoke_privileges_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_grant_revoke_privileges_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_grant_revoke_privileges_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_grant_revoke_privileges_presult__isset { + _ThriftHiveMetastore_grant_revoke_privileges_presult__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_grant_revoke_privileges_presult__isset; + +class ThriftHiveMetastore_grant_revoke_privileges_presult { + public: + + + virtual ~ThriftHiveMetastore_grant_revoke_privileges_presult() throw() {} + + GrantRevokePrivilegeResponse* success; + MetaException o1; + + _ThriftHiveMetastore_grant_revoke_privileges_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + typedef struct _ThriftHiveMetastore_set_ugi_args__isset { _ThriftHiveMetastore_set_ugi_args__isset() : user_name(false), group_names(false) {} bool user_name; @@ -15601,6 +15723,9 @@ class ThriftHiveMetastoreClient : virtual public ThriftHiveMetastoreIf, public bool revoke_privileges(const PrivilegeBag& privileges); void send_revoke_privileges(const PrivilegeBag& privileges); bool recv_revoke_privileges(); + void grant_revoke_privileges(GrantRevokePrivilegeResponse& _return, const GrantRevokePrivilegeRequest& request); + void send_grant_revoke_privileges(const GrantRevokePrivilegeRequest& request); + void recv_grant_revoke_privileges(GrantRevokePrivilegeResponse& _return); void set_ugi(std::vector & _return, const std::string& user_name, const std::vector & group_names); void send_set_ugi(const std::string& user_name, const std::vector & group_names); void recv_set_ugi(std::vector & _return); @@ -15753,6 +15878,7 @@ class ThriftHiveMetastoreProcessor : public ::facebook::fb303::FacebookServiceP void process_list_privileges(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_grant_privileges(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_revoke_privileges(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_grant_revoke_privileges(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_set_ugi(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_get_delegation_token(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_renew_delegation_token(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); @@ -15865,6 +15991,7 @@ class ThriftHiveMetastoreProcessor : public ::facebook::fb303::FacebookServiceP processMap_["list_privileges"] = &ThriftHiveMetastoreProcessor::process_list_privileges; processMap_["grant_privileges"] = &ThriftHiveMetastoreProcessor::process_grant_privileges; processMap_["revoke_privileges"] = &ThriftHiveMetastoreProcessor::process_revoke_privileges; + processMap_["grant_revoke_privileges"] = &ThriftHiveMetastoreProcessor::process_grant_revoke_privileges; processMap_["set_ugi"] = &ThriftHiveMetastoreProcessor::process_set_ugi; processMap_["get_delegation_token"] = &ThriftHiveMetastoreProcessor::process_get_delegation_token; processMap_["renew_delegation_token"] = &ThriftHiveMetastoreProcessor::process_renew_delegation_token; @@ -16787,6 +16914,16 @@ class ThriftHiveMetastoreMultiface : virtual public ThriftHiveMetastoreIf, publi return ifaces_[i]->revoke_privileges(privileges); } + void grant_revoke_privileges(GrantRevokePrivilegeResponse& _return, const GrantRevokePrivilegeRequest& request) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->grant_revoke_privileges(_return, request); + } + ifaces_[i]->grant_revoke_privileges(_return, request); + return; + } + void set_ugi(std::vector & _return, const std::string& user_name, const std::vector & group_names) { size_t sz = ifaces_.size(); size_t i = 0; diff --git metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp index a72076b..957b976 100644 --- metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp +++ metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp @@ -477,6 +477,11 @@ class ThriftHiveMetastoreHandler : virtual public ThriftHiveMetastoreIf { printf("revoke_privileges\n"); } + void grant_revoke_privileges(GrantRevokePrivilegeResponse& _return, const GrantRevokePrivilegeRequest& request) { + // Your implementation goes here + printf("grant_revoke_privileges\n"); + } + void set_ugi(std::vector & _return, const std::string& user_name, const std::vector & group_names) { // Your implementation goes here printf("set_ugi\n"); diff --git metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp index 9981387..a6a40fd 100644 --- metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp +++ metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp @@ -1080,6 +1080,160 @@ void swap(PrincipalPrivilegeSet &a, PrincipalPrivilegeSet &b) { swap(a.__isset, b.__isset); } +const char* GrantRevokePrivilegeRequest::ascii_fingerprint = "DF474A3CB526AD40DC0F2C3702F7AA2C"; +const uint8_t GrantRevokePrivilegeRequest::binary_fingerprint[16] = {0xDF,0x47,0x4A,0x3C,0xB5,0x26,0xAD,0x40,0xDC,0x0F,0x2C,0x37,0x02,0xF7,0xAA,0x2C}; + +uint32_t GrantRevokePrivilegeRequest::read(::apache::thrift::protocol::TProtocol* 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_I32) { + int32_t ecast63; + xfer += iprot->readI32(ecast63); + this->requestType = (GrantRevokeType::type)ecast63; + this->__isset.requestType = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->privileges.read(iprot); + this->__isset.privileges = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->revokeGrantOption); + this->__isset.revokeGrantOption = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t GrantRevokePrivilegeRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("GrantRevokePrivilegeRequest"); + + xfer += oprot->writeFieldBegin("requestType", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32((int32_t)this->requestType); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->privileges.write(oprot); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.revokeGrantOption) { + xfer += oprot->writeFieldBegin("revokeGrantOption", ::apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->revokeGrantOption); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(GrantRevokePrivilegeRequest &a, GrantRevokePrivilegeRequest &b) { + using ::std::swap; + swap(a.requestType, b.requestType); + swap(a.privileges, b.privileges); + swap(a.revokeGrantOption, b.revokeGrantOption); + swap(a.__isset, b.__isset); +} + +const char* GrantRevokePrivilegeResponse::ascii_fingerprint = "BF054652DEF86253C2BEE7D947F167DD"; +const uint8_t GrantRevokePrivilegeResponse::binary_fingerprint[16] = {0xBF,0x05,0x46,0x52,0xDE,0xF8,0x62,0x53,0xC2,0xBE,0xE7,0xD9,0x47,0xF1,0x67,0xDD}; + +uint32_t GrantRevokePrivilegeResponse::read(::apache::thrift::protocol::TProtocol* 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_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t GrantRevokePrivilegeResponse::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("GrantRevokePrivilegeResponse"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 1); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(GrantRevokePrivilegeResponse &a, GrantRevokePrivilegeResponse &b) { + using ::std::swap; + swap(a.success, b.success); + swap(a.__isset, b.__isset); +} + const char* Role::ascii_fingerprint = "70563A0628F75DF9555F4D24690B1E26"; const uint8_t Role::binary_fingerprint[16] = {0x70,0x56,0x3A,0x06,0x28,0xF7,0x5D,0xF9,0x55,0x5F,0x4D,0x24,0x69,0x0B,0x1E,0x26}; @@ -1209,9 +1363,9 @@ uint32_t RolePrincipalGrant::read(::apache::thrift::protocol::TProtocol* iprot) break; case 3: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast63; - xfer += iprot->readI32(ecast63); - this->principalType = (PrincipalType::type)ecast63; + int32_t ecast64; + xfer += iprot->readI32(ecast64); + this->principalType = (PrincipalType::type)ecast64; this->__isset.principalType = true; } else { xfer += iprot->skip(ftype); @@ -1243,9 +1397,9 @@ uint32_t RolePrincipalGrant::read(::apache::thrift::protocol::TProtocol* iprot) break; case 7: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast64; - xfer += iprot->readI32(ecast64); - this->grantorPrincipalType = (PrincipalType::type)ecast64; + int32_t ecast65; + xfer += iprot->readI32(ecast65); + this->grantorPrincipalType = (PrincipalType::type)ecast65; this->__isset.grantorPrincipalType = true; } else { xfer += iprot->skip(ftype); @@ -1347,9 +1501,9 @@ uint32_t GetRoleGrantsForPrincipalRequest::read(::apache::thrift::protocol::TPro break; case 2: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast65; - xfer += iprot->readI32(ecast65); - this->principal_type = (PrincipalType::type)ecast65; + int32_t ecast66; + xfer += iprot->readI32(ecast66); + this->principal_type = (PrincipalType::type)ecast66; isset_principal_type = true; } else { xfer += iprot->skip(ftype); @@ -1422,14 +1576,14 @@ uint32_t GetRoleGrantsForPrincipalResponse::read(::apache::thrift::protocol::TPr if (ftype == ::apache::thrift::protocol::T_LIST) { { this->principalGrants.clear(); - uint32_t _size66; - ::apache::thrift::protocol::TType _etype69; - xfer += iprot->readListBegin(_etype69, _size66); - this->principalGrants.resize(_size66); - uint32_t _i70; - for (_i70 = 0; _i70 < _size66; ++_i70) + uint32_t _size67; + ::apache::thrift::protocol::TType _etype70; + xfer += iprot->readListBegin(_etype70, _size67); + this->principalGrants.resize(_size67); + uint32_t _i71; + for (_i71 = 0; _i71 < _size67; ++_i71) { - xfer += this->principalGrants[_i70].read(iprot); + xfer += this->principalGrants[_i71].read(iprot); } xfer += iprot->readListEnd(); } @@ -1459,10 +1613,10 @@ uint32_t GetRoleGrantsForPrincipalResponse::write(::apache::thrift::protocol::TP xfer += oprot->writeFieldBegin("principalGrants", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->principalGrants.size())); - std::vector ::const_iterator _iter71; - for (_iter71 = this->principalGrants.begin(); _iter71 != this->principalGrants.end(); ++_iter71) + std::vector ::const_iterator _iter72; + for (_iter72 = this->principalGrants.begin(); _iter72 != this->principalGrants.end(); ++_iter72) { - xfer += (*_iter71).write(oprot); + xfer += (*_iter72).write(oprot); } xfer += oprot->writeListEnd(); } @@ -1570,14 +1724,14 @@ uint32_t GetPrincipalsInRoleResponse::read(::apache::thrift::protocol::TProtocol if (ftype == ::apache::thrift::protocol::T_LIST) { { this->principalGrants.clear(); - uint32_t _size72; - ::apache::thrift::protocol::TType _etype75; - xfer += iprot->readListBegin(_etype75, _size72); - this->principalGrants.resize(_size72); - uint32_t _i76; - for (_i76 = 0; _i76 < _size72; ++_i76) + uint32_t _size73; + ::apache::thrift::protocol::TType _etype76; + xfer += iprot->readListBegin(_etype76, _size73); + this->principalGrants.resize(_size73); + uint32_t _i77; + for (_i77 = 0; _i77 < _size73; ++_i77) { - xfer += this->principalGrants[_i76].read(iprot); + xfer += this->principalGrants[_i77].read(iprot); } xfer += iprot->readListEnd(); } @@ -1607,10 +1761,10 @@ uint32_t GetPrincipalsInRoleResponse::write(::apache::thrift::protocol::TProtoco xfer += oprot->writeFieldBegin("principalGrants", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->principalGrants.size())); - std::vector ::const_iterator _iter77; - for (_iter77 = this->principalGrants.begin(); _iter77 != this->principalGrants.end(); ++_iter77) + std::vector ::const_iterator _iter78; + for (_iter78 = this->principalGrants.begin(); _iter78 != this->principalGrants.end(); ++_iter78) { - xfer += (*_iter77).write(oprot); + xfer += (*_iter78).write(oprot); } xfer += oprot->writeListEnd(); } @@ -1651,9 +1805,9 @@ uint32_t GrantRevokeRoleRequest::read(::apache::thrift::protocol::TProtocol* ipr { case 1: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast78; - xfer += iprot->readI32(ecast78); - this->requestType = (GrantRevokeType::type)ecast78; + int32_t ecast79; + xfer += iprot->readI32(ecast79); + this->requestType = (GrantRevokeType::type)ecast79; this->__isset.requestType = true; } else { xfer += iprot->skip(ftype); @@ -1677,9 +1831,9 @@ uint32_t GrantRevokeRoleRequest::read(::apache::thrift::protocol::TProtocol* ipr break; case 4: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast79; - xfer += iprot->readI32(ecast79); - this->principalType = (PrincipalType::type)ecast79; + int32_t ecast80; + xfer += iprot->readI32(ecast80); + this->principalType = (PrincipalType::type)ecast80; this->__isset.principalType = true; } else { xfer += iprot->skip(ftype); @@ -1695,9 +1849,9 @@ uint32_t GrantRevokeRoleRequest::read(::apache::thrift::protocol::TProtocol* ipr break; case 6: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast80; - xfer += iprot->readI32(ecast80); - this->grantorType = (PrincipalType::type)ecast80; + int32_t ecast81; + xfer += iprot->readI32(ecast81); + this->grantorType = (PrincipalType::type)ecast81; this->__isset.grantorType = true; } else { xfer += iprot->skip(ftype); @@ -1889,17 +2043,17 @@ uint32_t Database::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_MAP) { { this->parameters.clear(); - uint32_t _size81; - ::apache::thrift::protocol::TType _ktype82; - ::apache::thrift::protocol::TType _vtype83; - xfer += iprot->readMapBegin(_ktype82, _vtype83, _size81); - uint32_t _i85; - for (_i85 = 0; _i85 < _size81; ++_i85) + uint32_t _size82; + ::apache::thrift::protocol::TType _ktype83; + ::apache::thrift::protocol::TType _vtype84; + xfer += iprot->readMapBegin(_ktype83, _vtype84, _size82); + uint32_t _i86; + for (_i86 = 0; _i86 < _size82; ++_i86) { - std::string _key86; - xfer += iprot->readString(_key86); - std::string& _val87 = this->parameters[_key86]; - xfer += iprot->readString(_val87); + std::string _key87; + xfer += iprot->readString(_key87); + std::string& _val88 = this->parameters[_key87]; + xfer += iprot->readString(_val88); } xfer += iprot->readMapEnd(); } @@ -1926,9 +2080,9 @@ uint32_t Database::read(::apache::thrift::protocol::TProtocol* iprot) { break; case 7: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast88; - xfer += iprot->readI32(ecast88); - this->ownerType = (PrincipalType::type)ecast88; + int32_t ecast89; + xfer += iprot->readI32(ecast89); + this->ownerType = (PrincipalType::type)ecast89; this->__isset.ownerType = true; } else { xfer += iprot->skip(ftype); @@ -1965,11 +2119,11 @@ uint32_t Database::write(::apache::thrift::protocol::TProtocol* oprot) const { xfer += oprot->writeFieldBegin("parameters", ::apache::thrift::protocol::T_MAP, 4); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->parameters.size())); - std::map ::const_iterator _iter89; - for (_iter89 = this->parameters.begin(); _iter89 != this->parameters.end(); ++_iter89) + std::map ::const_iterator _iter90; + for (_iter90 = this->parameters.begin(); _iter90 != this->parameters.end(); ++_iter90) { - xfer += oprot->writeString(_iter89->first); - xfer += oprot->writeString(_iter89->second); + xfer += oprot->writeString(_iter90->first); + xfer += oprot->writeString(_iter90->second); } xfer += oprot->writeMapEnd(); } @@ -2050,17 +2204,17 @@ uint32_t SerDeInfo::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_MAP) { { this->parameters.clear(); - uint32_t _size90; - ::apache::thrift::protocol::TType _ktype91; - ::apache::thrift::protocol::TType _vtype92; - xfer += iprot->readMapBegin(_ktype91, _vtype92, _size90); - uint32_t _i94; - for (_i94 = 0; _i94 < _size90; ++_i94) + uint32_t _size91; + ::apache::thrift::protocol::TType _ktype92; + ::apache::thrift::protocol::TType _vtype93; + xfer += iprot->readMapBegin(_ktype92, _vtype93, _size91); + uint32_t _i95; + for (_i95 = 0; _i95 < _size91; ++_i95) { - std::string _key95; - xfer += iprot->readString(_key95); - std::string& _val96 = this->parameters[_key95]; - xfer += iprot->readString(_val96); + std::string _key96; + xfer += iprot->readString(_key96); + std::string& _val97 = this->parameters[_key96]; + xfer += iprot->readString(_val97); } xfer += iprot->readMapEnd(); } @@ -2096,11 +2250,11 @@ uint32_t SerDeInfo::write(::apache::thrift::protocol::TProtocol* oprot) const { xfer += oprot->writeFieldBegin("parameters", ::apache::thrift::protocol::T_MAP, 3); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->parameters.size())); - std::map ::const_iterator _iter97; - for (_iter97 = this->parameters.begin(); _iter97 != this->parameters.end(); ++_iter97) + std::map ::const_iterator _iter98; + for (_iter98 = this->parameters.begin(); _iter98 != this->parameters.end(); ++_iter98) { - xfer += oprot->writeString(_iter97->first); - xfer += oprot->writeString(_iter97->second); + xfer += oprot->writeString(_iter98->first); + xfer += oprot->writeString(_iter98->second); } xfer += oprot->writeMapEnd(); } @@ -2221,14 +2375,14 @@ uint32_t SkewedInfo::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->skewedColNames.clear(); - uint32_t _size98; - ::apache::thrift::protocol::TType _etype101; - xfer += iprot->readListBegin(_etype101, _size98); - this->skewedColNames.resize(_size98); - uint32_t _i102; - for (_i102 = 0; _i102 < _size98; ++_i102) + uint32_t _size99; + ::apache::thrift::protocol::TType _etype102; + xfer += iprot->readListBegin(_etype102, _size99); + this->skewedColNames.resize(_size99); + uint32_t _i103; + for (_i103 = 0; _i103 < _size99; ++_i103) { - xfer += iprot->readString(this->skewedColNames[_i102]); + xfer += iprot->readString(this->skewedColNames[_i103]); } xfer += iprot->readListEnd(); } @@ -2241,23 +2395,23 @@ uint32_t SkewedInfo::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->skewedColValues.clear(); - uint32_t _size103; - ::apache::thrift::protocol::TType _etype106; - xfer += iprot->readListBegin(_etype106, _size103); - this->skewedColValues.resize(_size103); - uint32_t _i107; - for (_i107 = 0; _i107 < _size103; ++_i107) + uint32_t _size104; + ::apache::thrift::protocol::TType _etype107; + xfer += iprot->readListBegin(_etype107, _size104); + this->skewedColValues.resize(_size104); + uint32_t _i108; + for (_i108 = 0; _i108 < _size104; ++_i108) { { - this->skewedColValues[_i107].clear(); - uint32_t _size108; - ::apache::thrift::protocol::TType _etype111; - xfer += iprot->readListBegin(_etype111, _size108); - this->skewedColValues[_i107].resize(_size108); - uint32_t _i112; - for (_i112 = 0; _i112 < _size108; ++_i112) + this->skewedColValues[_i108].clear(); + uint32_t _size109; + ::apache::thrift::protocol::TType _etype112; + xfer += iprot->readListBegin(_etype112, _size109); + this->skewedColValues[_i108].resize(_size109); + uint32_t _i113; + for (_i113 = 0; _i113 < _size109; ++_i113) { - xfer += iprot->readString(this->skewedColValues[_i107][_i112]); + xfer += iprot->readString(this->skewedColValues[_i108][_i113]); } xfer += iprot->readListEnd(); } @@ -2273,29 +2427,29 @@ uint32_t SkewedInfo::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_MAP) { { this->skewedColValueLocationMaps.clear(); - uint32_t _size113; - ::apache::thrift::protocol::TType _ktype114; - ::apache::thrift::protocol::TType _vtype115; - xfer += iprot->readMapBegin(_ktype114, _vtype115, _size113); - uint32_t _i117; - for (_i117 = 0; _i117 < _size113; ++_i117) + uint32_t _size114; + ::apache::thrift::protocol::TType _ktype115; + ::apache::thrift::protocol::TType _vtype116; + xfer += iprot->readMapBegin(_ktype115, _vtype116, _size114); + uint32_t _i118; + for (_i118 = 0; _i118 < _size114; ++_i118) { - std::vector _key118; + std::vector _key119; { - _key118.clear(); - uint32_t _size120; - ::apache::thrift::protocol::TType _etype123; - xfer += iprot->readListBegin(_etype123, _size120); - _key118.resize(_size120); - uint32_t _i124; - for (_i124 = 0; _i124 < _size120; ++_i124) + _key119.clear(); + uint32_t _size121; + ::apache::thrift::protocol::TType _etype124; + xfer += iprot->readListBegin(_etype124, _size121); + _key119.resize(_size121); + uint32_t _i125; + for (_i125 = 0; _i125 < _size121; ++_i125) { - xfer += iprot->readString(_key118[_i124]); + xfer += iprot->readString(_key119[_i125]); } xfer += iprot->readListEnd(); } - std::string& _val119 = this->skewedColValueLocationMaps[_key118]; - xfer += iprot->readString(_val119); + std::string& _val120 = this->skewedColValueLocationMaps[_key119]; + xfer += iprot->readString(_val120); } xfer += iprot->readMapEnd(); } @@ -2323,10 +2477,10 @@ uint32_t SkewedInfo::write(::apache::thrift::protocol::TProtocol* oprot) const { xfer += oprot->writeFieldBegin("skewedColNames", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->skewedColNames.size())); - std::vector ::const_iterator _iter125; - for (_iter125 = this->skewedColNames.begin(); _iter125 != this->skewedColNames.end(); ++_iter125) + std::vector ::const_iterator _iter126; + for (_iter126 = this->skewedColNames.begin(); _iter126 != this->skewedColNames.end(); ++_iter126) { - xfer += oprot->writeString((*_iter125)); + xfer += oprot->writeString((*_iter126)); } xfer += oprot->writeListEnd(); } @@ -2335,15 +2489,15 @@ uint32_t SkewedInfo::write(::apache::thrift::protocol::TProtocol* oprot) const { xfer += oprot->writeFieldBegin("skewedColValues", ::apache::thrift::protocol::T_LIST, 2); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_LIST, static_cast(this->skewedColValues.size())); - std::vector > ::const_iterator _iter126; - for (_iter126 = this->skewedColValues.begin(); _iter126 != this->skewedColValues.end(); ++_iter126) + std::vector > ::const_iterator _iter127; + for (_iter127 = this->skewedColValues.begin(); _iter127 != this->skewedColValues.end(); ++_iter127) { { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*_iter126).size())); - std::vector ::const_iterator _iter127; - for (_iter127 = (*_iter126).begin(); _iter127 != (*_iter126).end(); ++_iter127) + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*_iter127).size())); + std::vector ::const_iterator _iter128; + for (_iter128 = (*_iter127).begin(); _iter128 != (*_iter127).end(); ++_iter128) { - xfer += oprot->writeString((*_iter127)); + xfer += oprot->writeString((*_iter128)); } xfer += oprot->writeListEnd(); } @@ -2355,19 +2509,19 @@ uint32_t SkewedInfo::write(::apache::thrift::protocol::TProtocol* oprot) const { xfer += oprot->writeFieldBegin("skewedColValueLocationMaps", ::apache::thrift::protocol::T_MAP, 3); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_LIST, ::apache::thrift::protocol::T_STRING, static_cast(this->skewedColValueLocationMaps.size())); - std::map , std::string> ::const_iterator _iter128; - for (_iter128 = this->skewedColValueLocationMaps.begin(); _iter128 != this->skewedColValueLocationMaps.end(); ++_iter128) + std::map , std::string> ::const_iterator _iter129; + for (_iter129 = this->skewedColValueLocationMaps.begin(); _iter129 != this->skewedColValueLocationMaps.end(); ++_iter129) { { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(_iter128->first.size())); - std::vector ::const_iterator _iter129; - for (_iter129 = _iter128->first.begin(); _iter129 != _iter128->first.end(); ++_iter129) + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(_iter129->first.size())); + std::vector ::const_iterator _iter130; + for (_iter130 = _iter129->first.begin(); _iter130 != _iter129->first.end(); ++_iter130) { - xfer += oprot->writeString((*_iter129)); + xfer += oprot->writeString((*_iter130)); } xfer += oprot->writeListEnd(); } - xfer += oprot->writeString(_iter128->second); + xfer += oprot->writeString(_iter129->second); } xfer += oprot->writeMapEnd(); } @@ -2413,14 +2567,14 @@ uint32_t StorageDescriptor::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->cols.clear(); - uint32_t _size130; - ::apache::thrift::protocol::TType _etype133; - xfer += iprot->readListBegin(_etype133, _size130); - this->cols.resize(_size130); - uint32_t _i134; - for (_i134 = 0; _i134 < _size130; ++_i134) + uint32_t _size131; + ::apache::thrift::protocol::TType _etype134; + xfer += iprot->readListBegin(_etype134, _size131); + this->cols.resize(_size131); + uint32_t _i135; + for (_i135 = 0; _i135 < _size131; ++_i135) { - xfer += this->cols[_i134].read(iprot); + xfer += this->cols[_i135].read(iprot); } xfer += iprot->readListEnd(); } @@ -2481,14 +2635,14 @@ uint32_t StorageDescriptor::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->bucketCols.clear(); - uint32_t _size135; - ::apache::thrift::protocol::TType _etype138; - xfer += iprot->readListBegin(_etype138, _size135); - this->bucketCols.resize(_size135); - uint32_t _i139; - for (_i139 = 0; _i139 < _size135; ++_i139) + uint32_t _size136; + ::apache::thrift::protocol::TType _etype139; + xfer += iprot->readListBegin(_etype139, _size136); + this->bucketCols.resize(_size136); + uint32_t _i140; + for (_i140 = 0; _i140 < _size136; ++_i140) { - xfer += iprot->readString(this->bucketCols[_i139]); + xfer += iprot->readString(this->bucketCols[_i140]); } xfer += iprot->readListEnd(); } @@ -2501,14 +2655,14 @@ uint32_t StorageDescriptor::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->sortCols.clear(); - uint32_t _size140; - ::apache::thrift::protocol::TType _etype143; - xfer += iprot->readListBegin(_etype143, _size140); - this->sortCols.resize(_size140); - uint32_t _i144; - for (_i144 = 0; _i144 < _size140; ++_i144) + uint32_t _size141; + ::apache::thrift::protocol::TType _etype144; + xfer += iprot->readListBegin(_etype144, _size141); + this->sortCols.resize(_size141); + uint32_t _i145; + for (_i145 = 0; _i145 < _size141; ++_i145) { - xfer += this->sortCols[_i144].read(iprot); + xfer += this->sortCols[_i145].read(iprot); } xfer += iprot->readListEnd(); } @@ -2521,17 +2675,17 @@ uint32_t StorageDescriptor::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_MAP) { { this->parameters.clear(); - uint32_t _size145; - ::apache::thrift::protocol::TType _ktype146; - ::apache::thrift::protocol::TType _vtype147; - xfer += iprot->readMapBegin(_ktype146, _vtype147, _size145); - uint32_t _i149; - for (_i149 = 0; _i149 < _size145; ++_i149) + uint32_t _size146; + ::apache::thrift::protocol::TType _ktype147; + ::apache::thrift::protocol::TType _vtype148; + xfer += iprot->readMapBegin(_ktype147, _vtype148, _size146); + uint32_t _i150; + for (_i150 = 0; _i150 < _size146; ++_i150) { - std::string _key150; - xfer += iprot->readString(_key150); - std::string& _val151 = this->parameters[_key150]; - xfer += iprot->readString(_val151); + std::string _key151; + xfer += iprot->readString(_key151); + std::string& _val152 = this->parameters[_key151]; + xfer += iprot->readString(_val152); } xfer += iprot->readMapEnd(); } @@ -2575,10 +2729,10 @@ uint32_t StorageDescriptor::write(::apache::thrift::protocol::TProtocol* oprot) xfer += oprot->writeFieldBegin("cols", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->cols.size())); - std::vector ::const_iterator _iter152; - for (_iter152 = this->cols.begin(); _iter152 != this->cols.end(); ++_iter152) + std::vector ::const_iterator _iter153; + for (_iter153 = this->cols.begin(); _iter153 != this->cols.end(); ++_iter153) { - xfer += (*_iter152).write(oprot); + xfer += (*_iter153).write(oprot); } xfer += oprot->writeListEnd(); } @@ -2611,10 +2765,10 @@ uint32_t StorageDescriptor::write(::apache::thrift::protocol::TProtocol* oprot) xfer += oprot->writeFieldBegin("bucketCols", ::apache::thrift::protocol::T_LIST, 8); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->bucketCols.size())); - std::vector ::const_iterator _iter153; - for (_iter153 = this->bucketCols.begin(); _iter153 != this->bucketCols.end(); ++_iter153) + std::vector ::const_iterator _iter154; + for (_iter154 = this->bucketCols.begin(); _iter154 != this->bucketCols.end(); ++_iter154) { - xfer += oprot->writeString((*_iter153)); + xfer += oprot->writeString((*_iter154)); } xfer += oprot->writeListEnd(); } @@ -2623,10 +2777,10 @@ uint32_t StorageDescriptor::write(::apache::thrift::protocol::TProtocol* oprot) xfer += oprot->writeFieldBegin("sortCols", ::apache::thrift::protocol::T_LIST, 9); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->sortCols.size())); - std::vector ::const_iterator _iter154; - for (_iter154 = this->sortCols.begin(); _iter154 != this->sortCols.end(); ++_iter154) + std::vector ::const_iterator _iter155; + for (_iter155 = this->sortCols.begin(); _iter155 != this->sortCols.end(); ++_iter155) { - xfer += (*_iter154).write(oprot); + xfer += (*_iter155).write(oprot); } xfer += oprot->writeListEnd(); } @@ -2635,11 +2789,11 @@ uint32_t StorageDescriptor::write(::apache::thrift::protocol::TProtocol* oprot) xfer += oprot->writeFieldBegin("parameters", ::apache::thrift::protocol::T_MAP, 10); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->parameters.size())); - std::map ::const_iterator _iter155; - for (_iter155 = this->parameters.begin(); _iter155 != this->parameters.end(); ++_iter155) + std::map ::const_iterator _iter156; + for (_iter156 = this->parameters.begin(); _iter156 != this->parameters.end(); ++_iter156) { - xfer += oprot->writeString(_iter155->first); - xfer += oprot->writeString(_iter155->second); + xfer += oprot->writeString(_iter156->first); + xfer += oprot->writeString(_iter156->second); } xfer += oprot->writeMapEnd(); } @@ -2760,14 +2914,14 @@ uint32_t Table::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->partitionKeys.clear(); - uint32_t _size156; - ::apache::thrift::protocol::TType _etype159; - xfer += iprot->readListBegin(_etype159, _size156); - this->partitionKeys.resize(_size156); - uint32_t _i160; - for (_i160 = 0; _i160 < _size156; ++_i160) + uint32_t _size157; + ::apache::thrift::protocol::TType _etype160; + xfer += iprot->readListBegin(_etype160, _size157); + this->partitionKeys.resize(_size157); + uint32_t _i161; + for (_i161 = 0; _i161 < _size157; ++_i161) { - xfer += this->partitionKeys[_i160].read(iprot); + xfer += this->partitionKeys[_i161].read(iprot); } xfer += iprot->readListEnd(); } @@ -2780,17 +2934,17 @@ uint32_t Table::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_MAP) { { this->parameters.clear(); - uint32_t _size161; - ::apache::thrift::protocol::TType _ktype162; - ::apache::thrift::protocol::TType _vtype163; - xfer += iprot->readMapBegin(_ktype162, _vtype163, _size161); - uint32_t _i165; - for (_i165 = 0; _i165 < _size161; ++_i165) + uint32_t _size162; + ::apache::thrift::protocol::TType _ktype163; + ::apache::thrift::protocol::TType _vtype164; + xfer += iprot->readMapBegin(_ktype163, _vtype164, _size162); + uint32_t _i166; + for (_i166 = 0; _i166 < _size162; ++_i166) { - std::string _key166; - xfer += iprot->readString(_key166); - std::string& _val167 = this->parameters[_key166]; - xfer += iprot->readString(_val167); + std::string _key167; + xfer += iprot->readString(_key167); + std::string& _val168 = this->parameters[_key167]; + xfer += iprot->readString(_val168); } xfer += iprot->readMapEnd(); } @@ -2886,10 +3040,10 @@ uint32_t Table::write(::apache::thrift::protocol::TProtocol* oprot) const { xfer += oprot->writeFieldBegin("partitionKeys", ::apache::thrift::protocol::T_LIST, 8); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->partitionKeys.size())); - std::vector ::const_iterator _iter168; - for (_iter168 = this->partitionKeys.begin(); _iter168 != this->partitionKeys.end(); ++_iter168) + std::vector ::const_iterator _iter169; + for (_iter169 = this->partitionKeys.begin(); _iter169 != this->partitionKeys.end(); ++_iter169) { - xfer += (*_iter168).write(oprot); + xfer += (*_iter169).write(oprot); } xfer += oprot->writeListEnd(); } @@ -2898,11 +3052,11 @@ uint32_t Table::write(::apache::thrift::protocol::TProtocol* oprot) const { xfer += oprot->writeFieldBegin("parameters", ::apache::thrift::protocol::T_MAP, 9); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->parameters.size())); - std::map ::const_iterator _iter169; - for (_iter169 = this->parameters.begin(); _iter169 != this->parameters.end(); ++_iter169) + std::map ::const_iterator _iter170; + for (_iter170 = this->parameters.begin(); _iter170 != this->parameters.end(); ++_iter170) { - xfer += oprot->writeString(_iter169->first); - xfer += oprot->writeString(_iter169->second); + xfer += oprot->writeString(_iter170->first); + xfer += oprot->writeString(_iter170->second); } xfer += oprot->writeMapEnd(); } @@ -2981,14 +3135,14 @@ uint32_t Partition::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->values.clear(); - uint32_t _size170; - ::apache::thrift::protocol::TType _etype173; - xfer += iprot->readListBegin(_etype173, _size170); - this->values.resize(_size170); - uint32_t _i174; - for (_i174 = 0; _i174 < _size170; ++_i174) + uint32_t _size171; + ::apache::thrift::protocol::TType _etype174; + xfer += iprot->readListBegin(_etype174, _size171); + this->values.resize(_size171); + uint32_t _i175; + for (_i175 = 0; _i175 < _size171; ++_i175) { - xfer += iprot->readString(this->values[_i174]); + xfer += iprot->readString(this->values[_i175]); } xfer += iprot->readListEnd(); } @@ -3041,17 +3195,17 @@ uint32_t Partition::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_MAP) { { this->parameters.clear(); - uint32_t _size175; - ::apache::thrift::protocol::TType _ktype176; - ::apache::thrift::protocol::TType _vtype177; - xfer += iprot->readMapBegin(_ktype176, _vtype177, _size175); - uint32_t _i179; - for (_i179 = 0; _i179 < _size175; ++_i179) + uint32_t _size176; + ::apache::thrift::protocol::TType _ktype177; + ::apache::thrift::protocol::TType _vtype178; + xfer += iprot->readMapBegin(_ktype177, _vtype178, _size176); + uint32_t _i180; + for (_i180 = 0; _i180 < _size176; ++_i180) { - std::string _key180; - xfer += iprot->readString(_key180); - std::string& _val181 = this->parameters[_key180]; - xfer += iprot->readString(_val181); + std::string _key181; + xfer += iprot->readString(_key181); + std::string& _val182 = this->parameters[_key181]; + xfer += iprot->readString(_val182); } xfer += iprot->readMapEnd(); } @@ -3087,10 +3241,10 @@ uint32_t Partition::write(::apache::thrift::protocol::TProtocol* oprot) const { xfer += oprot->writeFieldBegin("values", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->values.size())); - std::vector ::const_iterator _iter182; - for (_iter182 = this->values.begin(); _iter182 != this->values.end(); ++_iter182) + std::vector ::const_iterator _iter183; + for (_iter183 = this->values.begin(); _iter183 != this->values.end(); ++_iter183) { - xfer += oprot->writeString((*_iter182)); + xfer += oprot->writeString((*_iter183)); } xfer += oprot->writeListEnd(); } @@ -3119,11 +3273,11 @@ uint32_t Partition::write(::apache::thrift::protocol::TProtocol* oprot) const { xfer += oprot->writeFieldBegin("parameters", ::apache::thrift::protocol::T_MAP, 7); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->parameters.size())); - std::map ::const_iterator _iter183; - for (_iter183 = this->parameters.begin(); _iter183 != this->parameters.end(); ++_iter183) + std::map ::const_iterator _iter184; + for (_iter184 = this->parameters.begin(); _iter184 != this->parameters.end(); ++_iter184) { - xfer += oprot->writeString(_iter183->first); - xfer += oprot->writeString(_iter183->second); + xfer += oprot->writeString(_iter184->first); + xfer += oprot->writeString(_iter184->second); } xfer += oprot->writeMapEnd(); } @@ -3243,17 +3397,17 @@ uint32_t Index::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_MAP) { { this->parameters.clear(); - uint32_t _size184; - ::apache::thrift::protocol::TType _ktype185; - ::apache::thrift::protocol::TType _vtype186; - xfer += iprot->readMapBegin(_ktype185, _vtype186, _size184); - uint32_t _i188; - for (_i188 = 0; _i188 < _size184; ++_i188) + uint32_t _size185; + ::apache::thrift::protocol::TType _ktype186; + ::apache::thrift::protocol::TType _vtype187; + xfer += iprot->readMapBegin(_ktype186, _vtype187, _size185); + uint32_t _i189; + for (_i189 = 0; _i189 < _size185; ++_i189) { - std::string _key189; - xfer += iprot->readString(_key189); - std::string& _val190 = this->parameters[_key189]; - xfer += iprot->readString(_val190); + std::string _key190; + xfer += iprot->readString(_key190); + std::string& _val191 = this->parameters[_key190]; + xfer += iprot->readString(_val191); } xfer += iprot->readMapEnd(); } @@ -3321,11 +3475,11 @@ uint32_t Index::write(::apache::thrift::protocol::TProtocol* oprot) const { xfer += oprot->writeFieldBegin("parameters", ::apache::thrift::protocol::T_MAP, 9); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->parameters.size())); - std::map ::const_iterator _iter191; - for (_iter191 = this->parameters.begin(); _iter191 != this->parameters.end(); ++_iter191) + std::map ::const_iterator _iter192; + for (_iter192 = this->parameters.begin(); _iter192 != this->parameters.end(); ++_iter192) { - xfer += oprot->writeString(_iter191->first); - xfer += oprot->writeString(_iter191->second); + xfer += oprot->writeString(_iter192->first); + xfer += oprot->writeString(_iter192->second); } xfer += oprot->writeMapEnd(); } @@ -4451,14 +4605,14 @@ uint32_t ColumnStatistics::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->statsObj.clear(); - uint32_t _size192; - ::apache::thrift::protocol::TType _etype195; - xfer += iprot->readListBegin(_etype195, _size192); - this->statsObj.resize(_size192); - uint32_t _i196; - for (_i196 = 0; _i196 < _size192; ++_i196) + uint32_t _size193; + ::apache::thrift::protocol::TType _etype196; + xfer += iprot->readListBegin(_etype196, _size193); + this->statsObj.resize(_size193); + uint32_t _i197; + for (_i197 = 0; _i197 < _size193; ++_i197) { - xfer += this->statsObj[_i196].read(iprot); + xfer += this->statsObj[_i197].read(iprot); } xfer += iprot->readListEnd(); } @@ -4494,10 +4648,10 @@ uint32_t ColumnStatistics::write(::apache::thrift::protocol::TProtocol* oprot) c xfer += oprot->writeFieldBegin("statsObj", ::apache::thrift::protocol::T_LIST, 2); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->statsObj.size())); - std::vector ::const_iterator _iter197; - for (_iter197 = this->statsObj.begin(); _iter197 != this->statsObj.end(); ++_iter197) + std::vector ::const_iterator _iter198; + for (_iter198 = this->statsObj.begin(); _iter198 != this->statsObj.end(); ++_iter198) { - xfer += (*_iter197).write(oprot); + xfer += (*_iter198).write(oprot); } xfer += oprot->writeListEnd(); } @@ -4541,14 +4695,14 @@ uint32_t Schema::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->fieldSchemas.clear(); - uint32_t _size198; - ::apache::thrift::protocol::TType _etype201; - xfer += iprot->readListBegin(_etype201, _size198); - this->fieldSchemas.resize(_size198); - uint32_t _i202; - for (_i202 = 0; _i202 < _size198; ++_i202) + uint32_t _size199; + ::apache::thrift::protocol::TType _etype202; + xfer += iprot->readListBegin(_etype202, _size199); + this->fieldSchemas.resize(_size199); + uint32_t _i203; + for (_i203 = 0; _i203 < _size199; ++_i203) { - xfer += this->fieldSchemas[_i202].read(iprot); + xfer += this->fieldSchemas[_i203].read(iprot); } xfer += iprot->readListEnd(); } @@ -4561,17 +4715,17 @@ uint32_t Schema::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_MAP) { { this->properties.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 _size204; + ::apache::thrift::protocol::TType _ktype205; + ::apache::thrift::protocol::TType _vtype206; + xfer += iprot->readMapBegin(_ktype205, _vtype206, _size204); + uint32_t _i208; + for (_i208 = 0; _i208 < _size204; ++_i208) { - std::string _key208; - xfer += iprot->readString(_key208); - std::string& _val209 = this->properties[_key208]; - xfer += iprot->readString(_val209); + std::string _key209; + xfer += iprot->readString(_key209); + std::string& _val210 = this->properties[_key209]; + xfer += iprot->readString(_val210); } xfer += iprot->readMapEnd(); } @@ -4599,10 +4753,10 @@ uint32_t Schema::write(::apache::thrift::protocol::TProtocol* oprot) const { xfer += oprot->writeFieldBegin("fieldSchemas", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->fieldSchemas.size())); - std::vector ::const_iterator _iter210; - for (_iter210 = this->fieldSchemas.begin(); _iter210 != this->fieldSchemas.end(); ++_iter210) + std::vector ::const_iterator _iter211; + for (_iter211 = this->fieldSchemas.begin(); _iter211 != this->fieldSchemas.end(); ++_iter211) { - xfer += (*_iter210).write(oprot); + xfer += (*_iter211).write(oprot); } xfer += oprot->writeListEnd(); } @@ -4611,11 +4765,11 @@ uint32_t Schema::write(::apache::thrift::protocol::TProtocol* oprot) const { xfer += oprot->writeFieldBegin("properties", ::apache::thrift::protocol::T_MAP, 2); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->properties.size())); - std::map ::const_iterator _iter211; - for (_iter211 = this->properties.begin(); _iter211 != this->properties.end(); ++_iter211) + std::map ::const_iterator _iter212; + for (_iter212 = this->properties.begin(); _iter212 != this->properties.end(); ++_iter212) { - xfer += oprot->writeString(_iter211->first); - xfer += oprot->writeString(_iter211->second); + xfer += oprot->writeString(_iter212->first); + xfer += oprot->writeString(_iter212->second); } xfer += oprot->writeMapEnd(); } @@ -4660,17 +4814,17 @@ uint32_t EnvironmentContext::read(::apache::thrift::protocol::TProtocol* iprot) if (ftype == ::apache::thrift::protocol::T_MAP) { { this->properties.clear(); - uint32_t _size212; - ::apache::thrift::protocol::TType _ktype213; - ::apache::thrift::protocol::TType _vtype214; - xfer += iprot->readMapBegin(_ktype213, _vtype214, _size212); - uint32_t _i216; - for (_i216 = 0; _i216 < _size212; ++_i216) + uint32_t _size213; + ::apache::thrift::protocol::TType _ktype214; + ::apache::thrift::protocol::TType _vtype215; + xfer += iprot->readMapBegin(_ktype214, _vtype215, _size213); + uint32_t _i217; + for (_i217 = 0; _i217 < _size213; ++_i217) { - std::string _key217; - xfer += iprot->readString(_key217); - std::string& _val218 = this->properties[_key217]; - xfer += iprot->readString(_val218); + std::string _key218; + xfer += iprot->readString(_key218); + std::string& _val219 = this->properties[_key218]; + xfer += iprot->readString(_val219); } xfer += iprot->readMapEnd(); } @@ -4698,11 +4852,11 @@ uint32_t EnvironmentContext::write(::apache::thrift::protocol::TProtocol* oprot) xfer += oprot->writeFieldBegin("properties", ::apache::thrift::protocol::T_MAP, 1); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->properties.size())); - std::map ::const_iterator _iter219; - for (_iter219 = this->properties.begin(); _iter219 != this->properties.end(); ++_iter219) + std::map ::const_iterator _iter220; + for (_iter220 = this->properties.begin(); _iter220 != this->properties.end(); ++_iter220) { - xfer += oprot->writeString(_iter219->first); - xfer += oprot->writeString(_iter219->second); + xfer += oprot->writeString(_iter220->first); + xfer += oprot->writeString(_iter220->second); } xfer += oprot->writeMapEnd(); } @@ -4748,14 +4902,14 @@ uint32_t PartitionsByExprResult::read(::apache::thrift::protocol::TProtocol* ipr if (ftype == ::apache::thrift::protocol::T_LIST) { { this->partitions.clear(); - uint32_t _size220; - ::apache::thrift::protocol::TType _etype223; - xfer += iprot->readListBegin(_etype223, _size220); - this->partitions.resize(_size220); - uint32_t _i224; - for (_i224 = 0; _i224 < _size220; ++_i224) + uint32_t _size221; + ::apache::thrift::protocol::TType _etype224; + xfer += iprot->readListBegin(_etype224, _size221); + this->partitions.resize(_size221); + uint32_t _i225; + for (_i225 = 0; _i225 < _size221; ++_i225) { - xfer += this->partitions[_i224].read(iprot); + xfer += this->partitions[_i225].read(iprot); } xfer += iprot->readListEnd(); } @@ -4795,10 +4949,10 @@ uint32_t PartitionsByExprResult::write(::apache::thrift::protocol::TProtocol* op xfer += oprot->writeFieldBegin("partitions", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->partitions.size())); - std::vector ::const_iterator _iter225; - for (_iter225 = this->partitions.begin(); _iter225 != this->partitions.end(); ++_iter225) + std::vector ::const_iterator _iter226; + for (_iter226 = this->partitions.begin(); _iter226 != this->partitions.end(); ++_iter226) { - xfer += (*_iter225).write(oprot); + xfer += (*_iter226).write(oprot); } xfer += oprot->writeListEnd(); } @@ -4972,14 +5126,14 @@ uint32_t TableStatsResult::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->tableStats.clear(); - uint32_t _size226; - ::apache::thrift::protocol::TType _etype229; - xfer += iprot->readListBegin(_etype229, _size226); - this->tableStats.resize(_size226); - uint32_t _i230; - for (_i230 = 0; _i230 < _size226; ++_i230) + uint32_t _size227; + ::apache::thrift::protocol::TType _etype230; + xfer += iprot->readListBegin(_etype230, _size227); + this->tableStats.resize(_size227); + uint32_t _i231; + for (_i231 = 0; _i231 < _size227; ++_i231) { - xfer += this->tableStats[_i230].read(iprot); + xfer += this->tableStats[_i231].read(iprot); } xfer += iprot->readListEnd(); } @@ -5009,10 +5163,10 @@ uint32_t TableStatsResult::write(::apache::thrift::protocol::TProtocol* oprot) c xfer += oprot->writeFieldBegin("tableStats", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->tableStats.size())); - std::vector ::const_iterator _iter231; - for (_iter231 = this->tableStats.begin(); _iter231 != this->tableStats.end(); ++_iter231) + std::vector ::const_iterator _iter232; + for (_iter232 = this->tableStats.begin(); _iter232 != this->tableStats.end(); ++_iter232) { - xfer += (*_iter231).write(oprot); + xfer += (*_iter232).write(oprot); } xfer += oprot->writeListEnd(); } @@ -5056,26 +5210,26 @@ uint32_t PartitionsStatsResult::read(::apache::thrift::protocol::TProtocol* ipro if (ftype == ::apache::thrift::protocol::T_MAP) { { this->partStats.clear(); - uint32_t _size232; - ::apache::thrift::protocol::TType _ktype233; - ::apache::thrift::protocol::TType _vtype234; - xfer += iprot->readMapBegin(_ktype233, _vtype234, _size232); - uint32_t _i236; - for (_i236 = 0; _i236 < _size232; ++_i236) + uint32_t _size233; + ::apache::thrift::protocol::TType _ktype234; + ::apache::thrift::protocol::TType _vtype235; + xfer += iprot->readMapBegin(_ktype234, _vtype235, _size233); + uint32_t _i237; + for (_i237 = 0; _i237 < _size233; ++_i237) { - std::string _key237; - xfer += iprot->readString(_key237); - std::vector & _val238 = this->partStats[_key237]; + std::string _key238; + xfer += iprot->readString(_key238); + std::vector & _val239 = this->partStats[_key238]; { - _val238.clear(); - uint32_t _size239; - ::apache::thrift::protocol::TType _etype242; - xfer += iprot->readListBegin(_etype242, _size239); - _val238.resize(_size239); - uint32_t _i243; - for (_i243 = 0; _i243 < _size239; ++_i243) + _val239.clear(); + uint32_t _size240; + ::apache::thrift::protocol::TType _etype243; + xfer += iprot->readListBegin(_etype243, _size240); + _val239.resize(_size240); + uint32_t _i244; + for (_i244 = 0; _i244 < _size240; ++_i244) { - xfer += _val238[_i243].read(iprot); + xfer += _val239[_i244].read(iprot); } xfer += iprot->readListEnd(); } @@ -5108,16 +5262,16 @@ uint32_t PartitionsStatsResult::write(::apache::thrift::protocol::TProtocol* opr xfer += oprot->writeFieldBegin("partStats", ::apache::thrift::protocol::T_MAP, 1); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_LIST, static_cast(this->partStats.size())); - std::map > ::const_iterator _iter244; - for (_iter244 = this->partStats.begin(); _iter244 != this->partStats.end(); ++_iter244) + std::map > ::const_iterator _iter245; + for (_iter245 = this->partStats.begin(); _iter245 != this->partStats.end(); ++_iter245) { - xfer += oprot->writeString(_iter244->first); + xfer += oprot->writeString(_iter245->first); { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(_iter244->second.size())); - std::vector ::const_iterator _iter245; - for (_iter245 = _iter244->second.begin(); _iter245 != _iter244->second.end(); ++_iter245) + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(_iter245->second.size())); + std::vector ::const_iterator _iter246; + for (_iter246 = _iter245->second.begin(); _iter246 != _iter245->second.end(); ++_iter246) { - xfer += (*_iter245).write(oprot); + xfer += (*_iter246).write(oprot); } xfer += oprot->writeListEnd(); } @@ -5182,14 +5336,14 @@ uint32_t TableStatsRequest::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->colNames.clear(); - uint32_t _size246; - ::apache::thrift::protocol::TType _etype249; - xfer += iprot->readListBegin(_etype249, _size246); - this->colNames.resize(_size246); - uint32_t _i250; - for (_i250 = 0; _i250 < _size246; ++_i250) + uint32_t _size247; + ::apache::thrift::protocol::TType _etype250; + xfer += iprot->readListBegin(_etype250, _size247); + this->colNames.resize(_size247); + uint32_t _i251; + for (_i251 = 0; _i251 < _size247; ++_i251) { - xfer += iprot->readString(this->colNames[_i250]); + xfer += iprot->readString(this->colNames[_i251]); } xfer += iprot->readListEnd(); } @@ -5231,10 +5385,10 @@ uint32_t TableStatsRequest::write(::apache::thrift::protocol::TProtocol* oprot) xfer += oprot->writeFieldBegin("colNames", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->colNames.size())); - std::vector ::const_iterator _iter251; - for (_iter251 = this->colNames.begin(); _iter251 != this->colNames.end(); ++_iter251) + std::vector ::const_iterator _iter252; + for (_iter252 = this->colNames.begin(); _iter252 != this->colNames.end(); ++_iter252) { - xfer += oprot->writeString((*_iter251)); + xfer += oprot->writeString((*_iter252)); } xfer += oprot->writeListEnd(); } @@ -5299,14 +5453,14 @@ uint32_t PartitionsStatsRequest::read(::apache::thrift::protocol::TProtocol* ipr if (ftype == ::apache::thrift::protocol::T_LIST) { { this->colNames.clear(); - uint32_t _size252; - ::apache::thrift::protocol::TType _etype255; - xfer += iprot->readListBegin(_etype255, _size252); - this->colNames.resize(_size252); - uint32_t _i256; - for (_i256 = 0; _i256 < _size252; ++_i256) + uint32_t _size253; + ::apache::thrift::protocol::TType _etype256; + xfer += iprot->readListBegin(_etype256, _size253); + this->colNames.resize(_size253); + uint32_t _i257; + for (_i257 = 0; _i257 < _size253; ++_i257) { - xfer += iprot->readString(this->colNames[_i256]); + xfer += iprot->readString(this->colNames[_i257]); } xfer += iprot->readListEnd(); } @@ -5319,14 +5473,14 @@ uint32_t PartitionsStatsRequest::read(::apache::thrift::protocol::TProtocol* ipr if (ftype == ::apache::thrift::protocol::T_LIST) { { this->partNames.clear(); - uint32_t _size257; - ::apache::thrift::protocol::TType _etype260; - xfer += iprot->readListBegin(_etype260, _size257); - this->partNames.resize(_size257); - uint32_t _i261; - for (_i261 = 0; _i261 < _size257; ++_i261) + uint32_t _size258; + ::apache::thrift::protocol::TType _etype261; + xfer += iprot->readListBegin(_etype261, _size258); + this->partNames.resize(_size258); + uint32_t _i262; + for (_i262 = 0; _i262 < _size258; ++_i262) { - xfer += iprot->readString(this->partNames[_i261]); + xfer += iprot->readString(this->partNames[_i262]); } xfer += iprot->readListEnd(); } @@ -5370,10 +5524,10 @@ uint32_t PartitionsStatsRequest::write(::apache::thrift::protocol::TProtocol* op xfer += oprot->writeFieldBegin("colNames", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->colNames.size())); - std::vector ::const_iterator _iter262; - for (_iter262 = this->colNames.begin(); _iter262 != this->colNames.end(); ++_iter262) + std::vector ::const_iterator _iter263; + for (_iter263 = this->colNames.begin(); _iter263 != this->colNames.end(); ++_iter263) { - xfer += oprot->writeString((*_iter262)); + xfer += oprot->writeString((*_iter263)); } xfer += oprot->writeListEnd(); } @@ -5382,10 +5536,10 @@ uint32_t PartitionsStatsRequest::write(::apache::thrift::protocol::TProtocol* op xfer += oprot->writeFieldBegin("partNames", ::apache::thrift::protocol::T_LIST, 4); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->partNames.size())); - std::vector ::const_iterator _iter263; - for (_iter263 = this->partNames.begin(); _iter263 != this->partNames.end(); ++_iter263) + std::vector ::const_iterator _iter264; + for (_iter264 = this->partNames.begin(); _iter264 != this->partNames.end(); ++_iter264) { - xfer += oprot->writeString((*_iter263)); + xfer += oprot->writeString((*_iter264)); } xfer += oprot->writeListEnd(); } @@ -5431,14 +5585,14 @@ uint32_t AddPartitionsResult::read(::apache::thrift::protocol::TProtocol* iprot) if (ftype == ::apache::thrift::protocol::T_LIST) { { this->partitions.clear(); - uint32_t _size264; - ::apache::thrift::protocol::TType _etype267; - xfer += iprot->readListBegin(_etype267, _size264); - this->partitions.resize(_size264); - uint32_t _i268; - for (_i268 = 0; _i268 < _size264; ++_i268) + uint32_t _size265; + ::apache::thrift::protocol::TType _etype268; + xfer += iprot->readListBegin(_etype268, _size265); + this->partitions.resize(_size265); + uint32_t _i269; + for (_i269 = 0; _i269 < _size265; ++_i269) { - xfer += this->partitions[_i268].read(iprot); + xfer += this->partitions[_i269].read(iprot); } xfer += iprot->readListEnd(); } @@ -5467,10 +5621,10 @@ uint32_t AddPartitionsResult::write(::apache::thrift::protocol::TProtocol* oprot xfer += oprot->writeFieldBegin("partitions", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->partitions.size())); - std::vector ::const_iterator _iter269; - for (_iter269 = this->partitions.begin(); _iter269 != this->partitions.end(); ++_iter269) + std::vector ::const_iterator _iter270; + for (_iter270 = this->partitions.begin(); _iter270 != this->partitions.end(); ++_iter270) { - xfer += (*_iter269).write(oprot); + xfer += (*_iter270).write(oprot); } xfer += oprot->writeListEnd(); } @@ -5534,14 +5688,14 @@ uint32_t AddPartitionsRequest::read(::apache::thrift::protocol::TProtocol* iprot if (ftype == ::apache::thrift::protocol::T_LIST) { { this->parts.clear(); - uint32_t _size270; - ::apache::thrift::protocol::TType _etype273; - xfer += iprot->readListBegin(_etype273, _size270); - this->parts.resize(_size270); - uint32_t _i274; - for (_i274 = 0; _i274 < _size270; ++_i274) + uint32_t _size271; + ::apache::thrift::protocol::TType _etype274; + xfer += iprot->readListBegin(_etype274, _size271); + this->parts.resize(_size271); + uint32_t _i275; + for (_i275 = 0; _i275 < _size271; ++_i275) { - xfer += this->parts[_i274].read(iprot); + xfer += this->parts[_i275].read(iprot); } xfer += iprot->readListEnd(); } @@ -5601,10 +5755,10 @@ uint32_t AddPartitionsRequest::write(::apache::thrift::protocol::TProtocol* opro xfer += oprot->writeFieldBegin("parts", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->parts.size())); - std::vector ::const_iterator _iter275; - for (_iter275 = this->parts.begin(); _iter275 != this->parts.end(); ++_iter275) + std::vector ::const_iterator _iter276; + for (_iter276 = this->parts.begin(); _iter276 != this->parts.end(); ++_iter276) { - xfer += (*_iter275).write(oprot); + xfer += (*_iter276).write(oprot); } xfer += oprot->writeListEnd(); } @@ -5661,14 +5815,14 @@ uint32_t DropPartitionsResult::read(::apache::thrift::protocol::TProtocol* iprot if (ftype == ::apache::thrift::protocol::T_LIST) { { this->partitions.clear(); - uint32_t _size276; - ::apache::thrift::protocol::TType _etype279; - xfer += iprot->readListBegin(_etype279, _size276); - this->partitions.resize(_size276); - uint32_t _i280; - for (_i280 = 0; _i280 < _size276; ++_i280) + uint32_t _size277; + ::apache::thrift::protocol::TType _etype280; + xfer += iprot->readListBegin(_etype280, _size277); + this->partitions.resize(_size277); + uint32_t _i281; + for (_i281 = 0; _i281 < _size277; ++_i281) { - xfer += this->partitions[_i280].read(iprot); + xfer += this->partitions[_i281].read(iprot); } xfer += iprot->readListEnd(); } @@ -5697,10 +5851,10 @@ uint32_t DropPartitionsResult::write(::apache::thrift::protocol::TProtocol* opro xfer += oprot->writeFieldBegin("partitions", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->partitions.size())); - std::vector ::const_iterator _iter281; - for (_iter281 = this->partitions.begin(); _iter281 != this->partitions.end(); ++_iter281) + std::vector ::const_iterator _iter282; + for (_iter282 = this->partitions.begin(); _iter282 != this->partitions.end(); ++_iter282) { - xfer += (*_iter281).write(oprot); + xfer += (*_iter282).write(oprot); } xfer += oprot->writeListEnd(); } @@ -5823,14 +5977,14 @@ uint32_t RequestPartsSpec::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->names.clear(); - uint32_t _size282; - ::apache::thrift::protocol::TType _etype285; - xfer += iprot->readListBegin(_etype285, _size282); - this->names.resize(_size282); - uint32_t _i286; - for (_i286 = 0; _i286 < _size282; ++_i286) + uint32_t _size283; + ::apache::thrift::protocol::TType _etype286; + xfer += iprot->readListBegin(_etype286, _size283); + this->names.resize(_size283); + uint32_t _i287; + for (_i287 = 0; _i287 < _size283; ++_i287) { - xfer += iprot->readString(this->names[_i286]); + xfer += iprot->readString(this->names[_i287]); } xfer += iprot->readListEnd(); } @@ -5843,14 +5997,14 @@ uint32_t RequestPartsSpec::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->exprs.clear(); - uint32_t _size287; - ::apache::thrift::protocol::TType _etype290; - xfer += iprot->readListBegin(_etype290, _size287); - this->exprs.resize(_size287); - uint32_t _i291; - for (_i291 = 0; _i291 < _size287; ++_i291) + uint32_t _size288; + ::apache::thrift::protocol::TType _etype291; + xfer += iprot->readListBegin(_etype291, _size288); + this->exprs.resize(_size288); + uint32_t _i292; + for (_i292 = 0; _i292 < _size288; ++_i292) { - xfer += this->exprs[_i291].read(iprot); + xfer += this->exprs[_i292].read(iprot); } xfer += iprot->readListEnd(); } @@ -5878,10 +6032,10 @@ uint32_t RequestPartsSpec::write(::apache::thrift::protocol::TProtocol* oprot) c xfer += oprot->writeFieldBegin("names", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->names.size())); - std::vector ::const_iterator _iter292; - for (_iter292 = this->names.begin(); _iter292 != this->names.end(); ++_iter292) + std::vector ::const_iterator _iter293; + for (_iter293 = this->names.begin(); _iter293 != this->names.end(); ++_iter293) { - xfer += oprot->writeString((*_iter292)); + xfer += oprot->writeString((*_iter293)); } xfer += oprot->writeListEnd(); } @@ -5890,10 +6044,10 @@ uint32_t RequestPartsSpec::write(::apache::thrift::protocol::TProtocol* oprot) c xfer += oprot->writeFieldBegin("exprs", ::apache::thrift::protocol::T_LIST, 2); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->exprs.size())); - std::vector ::const_iterator _iter293; - for (_iter293 = this->exprs.begin(); _iter293 != this->exprs.end(); ++_iter293) + std::vector ::const_iterator _iter294; + for (_iter294 = this->exprs.begin(); _iter294 != this->exprs.end(); ++_iter294) { - xfer += (*_iter293).write(oprot); + xfer += (*_iter294).write(oprot); } xfer += oprot->writeListEnd(); } @@ -6103,9 +6257,9 @@ uint32_t ResourceUri::read(::apache::thrift::protocol::TProtocol* iprot) { { case 1: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast294; - xfer += iprot->readI32(ecast294); - this->resourceType = (ResourceType::type)ecast294; + int32_t ecast295; + xfer += iprot->readI32(ecast295); + this->resourceType = (ResourceType::type)ecast295; this->__isset.resourceType = true; } else { xfer += iprot->skip(ftype); @@ -6212,9 +6366,9 @@ uint32_t Function::read(::apache::thrift::protocol::TProtocol* iprot) { break; case 5: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast295; - xfer += iprot->readI32(ecast295); - this->ownerType = (PrincipalType::type)ecast295; + int32_t ecast296; + xfer += iprot->readI32(ecast296); + this->ownerType = (PrincipalType::type)ecast296; this->__isset.ownerType = true; } else { xfer += iprot->skip(ftype); @@ -6230,9 +6384,9 @@ uint32_t Function::read(::apache::thrift::protocol::TProtocol* iprot) { break; case 7: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast296; - xfer += iprot->readI32(ecast296); - this->functionType = (FunctionType::type)ecast296; + int32_t ecast297; + xfer += iprot->readI32(ecast297); + this->functionType = (FunctionType::type)ecast297; this->__isset.functionType = true; } else { xfer += iprot->skip(ftype); @@ -6242,14 +6396,14 @@ uint32_t Function::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->resourceUris.clear(); - uint32_t _size297; - ::apache::thrift::protocol::TType _etype300; - xfer += iprot->readListBegin(_etype300, _size297); - this->resourceUris.resize(_size297); - uint32_t _i301; - for (_i301 = 0; _i301 < _size297; ++_i301) + uint32_t _size298; + ::apache::thrift::protocol::TType _etype301; + xfer += iprot->readListBegin(_etype301, _size298); + this->resourceUris.resize(_size298); + uint32_t _i302; + for (_i302 = 0; _i302 < _size298; ++_i302) { - xfer += this->resourceUris[_i301].read(iprot); + xfer += this->resourceUris[_i302].read(iprot); } xfer += iprot->readListEnd(); } @@ -6305,10 +6459,10 @@ uint32_t Function::write(::apache::thrift::protocol::TProtocol* oprot) const { xfer += oprot->writeFieldBegin("resourceUris", ::apache::thrift::protocol::T_LIST, 8); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->resourceUris.size())); - std::vector ::const_iterator _iter302; - for (_iter302 = this->resourceUris.begin(); _iter302 != this->resourceUris.end(); ++_iter302) + std::vector ::const_iterator _iter303; + for (_iter303 = this->resourceUris.begin(); _iter303 != this->resourceUris.end(); ++_iter303) { - xfer += (*_iter302).write(oprot); + xfer += (*_iter303).write(oprot); } xfer += oprot->writeListEnd(); } @@ -6369,9 +6523,9 @@ uint32_t TxnInfo::read(::apache::thrift::protocol::TProtocol* iprot) { break; case 2: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast303; - xfer += iprot->readI32(ecast303); - this->state = (TxnState::type)ecast303; + int32_t ecast304; + xfer += iprot->readI32(ecast304); + this->state = (TxnState::type)ecast304; isset_state = true; } else { xfer += iprot->skip(ftype); @@ -6483,14 +6637,14 @@ uint32_t GetOpenTxnsInfoResponse::read(::apache::thrift::protocol::TProtocol* ip if (ftype == ::apache::thrift::protocol::T_LIST) { { this->open_txns.clear(); - uint32_t _size304; - ::apache::thrift::protocol::TType _etype307; - xfer += iprot->readListBegin(_etype307, _size304); - this->open_txns.resize(_size304); - uint32_t _i308; - for (_i308 = 0; _i308 < _size304; ++_i308) + uint32_t _size305; + ::apache::thrift::protocol::TType _etype308; + xfer += iprot->readListBegin(_etype308, _size305); + this->open_txns.resize(_size305); + uint32_t _i309; + for (_i309 = 0; _i309 < _size305; ++_i309) { - xfer += this->open_txns[_i308].read(iprot); + xfer += this->open_txns[_i309].read(iprot); } xfer += iprot->readListEnd(); } @@ -6526,10 +6680,10 @@ uint32_t GetOpenTxnsInfoResponse::write(::apache::thrift::protocol::TProtocol* o xfer += oprot->writeFieldBegin("open_txns", ::apache::thrift::protocol::T_LIST, 2); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->open_txns.size())); - std::vector ::const_iterator _iter309; - for (_iter309 = this->open_txns.begin(); _iter309 != this->open_txns.end(); ++_iter309) + std::vector ::const_iterator _iter310; + for (_iter310 = this->open_txns.begin(); _iter310 != this->open_txns.end(); ++_iter310) { - xfer += (*_iter309).write(oprot); + xfer += (*_iter310).write(oprot); } xfer += oprot->writeListEnd(); } @@ -6583,15 +6737,15 @@ uint32_t GetOpenTxnsResponse::read(::apache::thrift::protocol::TProtocol* iprot) if (ftype == ::apache::thrift::protocol::T_SET) { { this->open_txns.clear(); - uint32_t _size310; - ::apache::thrift::protocol::TType _etype313; - xfer += iprot->readSetBegin(_etype313, _size310); - uint32_t _i314; - for (_i314 = 0; _i314 < _size310; ++_i314) + uint32_t _size311; + ::apache::thrift::protocol::TType _etype314; + xfer += iprot->readSetBegin(_etype314, _size311); + uint32_t _i315; + for (_i315 = 0; _i315 < _size311; ++_i315) { - int64_t _elem315; - xfer += iprot->readI64(_elem315); - this->open_txns.insert(_elem315); + int64_t _elem316; + xfer += iprot->readI64(_elem316); + this->open_txns.insert(_elem316); } xfer += iprot->readSetEnd(); } @@ -6627,10 +6781,10 @@ uint32_t GetOpenTxnsResponse::write(::apache::thrift::protocol::TProtocol* oprot xfer += oprot->writeFieldBegin("open_txns", ::apache::thrift::protocol::T_SET, 2); { xfer += oprot->writeSetBegin(::apache::thrift::protocol::T_I64, static_cast(this->open_txns.size())); - std::set ::const_iterator _iter316; - for (_iter316 = this->open_txns.begin(); _iter316 != this->open_txns.end(); ++_iter316) + std::set ::const_iterator _iter317; + for (_iter317 = this->open_txns.begin(); _iter317 != this->open_txns.end(); ++_iter317) { - xfer += oprot->writeI64((*_iter316)); + xfer += oprot->writeI64((*_iter317)); } xfer += oprot->writeSetEnd(); } @@ -6771,14 +6925,14 @@ uint32_t OpenTxnsResponse::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->txn_ids.clear(); - uint32_t _size317; - ::apache::thrift::protocol::TType _etype320; - xfer += iprot->readListBegin(_etype320, _size317); - this->txn_ids.resize(_size317); - uint32_t _i321; - for (_i321 = 0; _i321 < _size317; ++_i321) + uint32_t _size318; + ::apache::thrift::protocol::TType _etype321; + xfer += iprot->readListBegin(_etype321, _size318); + this->txn_ids.resize(_size318); + uint32_t _i322; + for (_i322 = 0; _i322 < _size318; ++_i322) { - xfer += iprot->readI64(this->txn_ids[_i321]); + xfer += iprot->readI64(this->txn_ids[_i322]); } xfer += iprot->readListEnd(); } @@ -6808,10 +6962,10 @@ uint32_t OpenTxnsResponse::write(::apache::thrift::protocol::TProtocol* oprot) c xfer += oprot->writeFieldBegin("txn_ids", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast(this->txn_ids.size())); - std::vector ::const_iterator _iter322; - for (_iter322 = this->txn_ids.begin(); _iter322 != this->txn_ids.end(); ++_iter322) + std::vector ::const_iterator _iter323; + for (_iter323 = this->txn_ids.begin(); _iter323 != this->txn_ids.end(); ++_iter323) { - xfer += oprot->writeI64((*_iter322)); + xfer += oprot->writeI64((*_iter323)); } xfer += oprot->writeListEnd(); } @@ -6983,9 +7137,9 @@ uint32_t LockComponent::read(::apache::thrift::protocol::TProtocol* iprot) { { case 1: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast323; - xfer += iprot->readI32(ecast323); - this->type = (LockType::type)ecast323; + int32_t ecast324; + xfer += iprot->readI32(ecast324); + this->type = (LockType::type)ecast324; isset_type = true; } else { xfer += iprot->skip(ftype); @@ -6993,9 +7147,9 @@ uint32_t LockComponent::read(::apache::thrift::protocol::TProtocol* iprot) { break; case 2: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast324; - xfer += iprot->readI32(ecast324); - this->level = (LockLevel::type)ecast324; + int32_t ecast325; + xfer += iprot->readI32(ecast325); + this->level = (LockLevel::type)ecast325; isset_level = true; } else { xfer += iprot->skip(ftype); @@ -7114,14 +7268,14 @@ uint32_t LockRequest::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->component.clear(); - uint32_t _size325; - ::apache::thrift::protocol::TType _etype328; - xfer += iprot->readListBegin(_etype328, _size325); - this->component.resize(_size325); - uint32_t _i329; - for (_i329 = 0; _i329 < _size325; ++_i329) + uint32_t _size326; + ::apache::thrift::protocol::TType _etype329; + xfer += iprot->readListBegin(_etype329, _size326); + this->component.resize(_size326); + uint32_t _i330; + for (_i330 = 0; _i330 < _size326; ++_i330) { - xfer += this->component[_i329].read(iprot); + xfer += this->component[_i330].read(iprot); } xfer += iprot->readListEnd(); } @@ -7179,10 +7333,10 @@ uint32_t LockRequest::write(::apache::thrift::protocol::TProtocol* oprot) const xfer += oprot->writeFieldBegin("component", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->component.size())); - std::vector ::const_iterator _iter330; - for (_iter330 = this->component.begin(); _iter330 != this->component.end(); ++_iter330) + std::vector ::const_iterator _iter331; + for (_iter331 = this->component.begin(); _iter331 != this->component.end(); ++_iter331) { - xfer += (*_iter330).write(oprot); + xfer += (*_iter331).write(oprot); } xfer += oprot->writeListEnd(); } @@ -7250,9 +7404,9 @@ uint32_t LockResponse::read(::apache::thrift::protocol::TProtocol* iprot) { break; case 2: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast331; - xfer += iprot->readI32(ecast331); - this->state = (LockState::type)ecast331; + int32_t ecast332; + xfer += iprot->readI32(ecast332); + this->state = (LockState::type)ecast332; isset_state = true; } else { xfer += iprot->skip(ftype); @@ -7534,9 +7688,9 @@ uint32_t ShowLocksResponseElement::read(::apache::thrift::protocol::TProtocol* i break; case 5: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast332; - xfer += iprot->readI32(ecast332); - this->state = (LockState::type)ecast332; + int32_t ecast333; + xfer += iprot->readI32(ecast333); + this->state = (LockState::type)ecast333; isset_state = true; } else { xfer += iprot->skip(ftype); @@ -7544,9 +7698,9 @@ uint32_t ShowLocksResponseElement::read(::apache::thrift::protocol::TProtocol* i break; case 6: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast333; - xfer += iprot->readI32(ecast333); - this->type = (LockType::type)ecast333; + int32_t ecast334; + xfer += iprot->readI32(ecast334); + this->type = (LockType::type)ecast334; isset_type = true; } else { xfer += iprot->skip(ftype); @@ -7718,14 +7872,14 @@ uint32_t ShowLocksResponse::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->locks.clear(); - uint32_t _size334; - ::apache::thrift::protocol::TType _etype337; - xfer += iprot->readListBegin(_etype337, _size334); - this->locks.resize(_size334); - uint32_t _i338; - for (_i338 = 0; _i338 < _size334; ++_i338) + uint32_t _size335; + ::apache::thrift::protocol::TType _etype338; + xfer += iprot->readListBegin(_etype338, _size335); + this->locks.resize(_size335); + uint32_t _i339; + for (_i339 = 0; _i339 < _size335; ++_i339) { - xfer += this->locks[_i338].read(iprot); + xfer += this->locks[_i339].read(iprot); } xfer += iprot->readListEnd(); } @@ -7753,10 +7907,10 @@ uint32_t ShowLocksResponse::write(::apache::thrift::protocol::TProtocol* oprot) xfer += oprot->writeFieldBegin("locks", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->locks.size())); - std::vector ::const_iterator _iter339; - for (_iter339 = this->locks.begin(); _iter339 != this->locks.end(); ++_iter339) + std::vector ::const_iterator _iter340; + for (_iter340 = this->locks.begin(); _iter340 != this->locks.end(); ++_iter340) { - xfer += (*_iter339).write(oprot); + xfer += (*_iter340).write(oprot); } xfer += oprot->writeListEnd(); } @@ -7959,15 +8113,15 @@ uint32_t HeartbeatTxnRangeResponse::read(::apache::thrift::protocol::TProtocol* if (ftype == ::apache::thrift::protocol::T_SET) { { this->aborted.clear(); - uint32_t _size340; - ::apache::thrift::protocol::TType _etype343; - xfer += iprot->readSetBegin(_etype343, _size340); - uint32_t _i344; - for (_i344 = 0; _i344 < _size340; ++_i344) + uint32_t _size341; + ::apache::thrift::protocol::TType _etype344; + xfer += iprot->readSetBegin(_etype344, _size341); + uint32_t _i345; + for (_i345 = 0; _i345 < _size341; ++_i345) { - int64_t _elem345; - xfer += iprot->readI64(_elem345); - this->aborted.insert(_elem345); + int64_t _elem346; + xfer += iprot->readI64(_elem346); + this->aborted.insert(_elem346); } xfer += iprot->readSetEnd(); } @@ -7980,15 +8134,15 @@ uint32_t HeartbeatTxnRangeResponse::read(::apache::thrift::protocol::TProtocol* if (ftype == ::apache::thrift::protocol::T_SET) { { this->nosuch.clear(); - uint32_t _size346; - ::apache::thrift::protocol::TType _etype349; - xfer += iprot->readSetBegin(_etype349, _size346); - uint32_t _i350; - for (_i350 = 0; _i350 < _size346; ++_i350) + uint32_t _size347; + ::apache::thrift::protocol::TType _etype350; + xfer += iprot->readSetBegin(_etype350, _size347); + uint32_t _i351; + for (_i351 = 0; _i351 < _size347; ++_i351) { - int64_t _elem351; - xfer += iprot->readI64(_elem351); - this->nosuch.insert(_elem351); + int64_t _elem352; + xfer += iprot->readI64(_elem352); + this->nosuch.insert(_elem352); } xfer += iprot->readSetEnd(); } @@ -8020,10 +8174,10 @@ uint32_t HeartbeatTxnRangeResponse::write(::apache::thrift::protocol::TProtocol* xfer += oprot->writeFieldBegin("aborted", ::apache::thrift::protocol::T_SET, 1); { xfer += oprot->writeSetBegin(::apache::thrift::protocol::T_I64, static_cast(this->aborted.size())); - std::set ::const_iterator _iter352; - for (_iter352 = this->aborted.begin(); _iter352 != this->aborted.end(); ++_iter352) + std::set ::const_iterator _iter353; + for (_iter353 = this->aborted.begin(); _iter353 != this->aborted.end(); ++_iter353) { - xfer += oprot->writeI64((*_iter352)); + xfer += oprot->writeI64((*_iter353)); } xfer += oprot->writeSetEnd(); } @@ -8032,10 +8186,10 @@ uint32_t HeartbeatTxnRangeResponse::write(::apache::thrift::protocol::TProtocol* xfer += oprot->writeFieldBegin("nosuch", ::apache::thrift::protocol::T_SET, 2); { xfer += oprot->writeSetBegin(::apache::thrift::protocol::T_I64, static_cast(this->nosuch.size())); - std::set ::const_iterator _iter353; - for (_iter353 = this->nosuch.begin(); _iter353 != this->nosuch.end(); ++_iter353) + std::set ::const_iterator _iter354; + for (_iter354 = this->nosuch.begin(); _iter354 != this->nosuch.end(); ++_iter354) { - xfer += oprot->writeI64((*_iter353)); + xfer += oprot->writeI64((*_iter354)); } xfer += oprot->writeSetEnd(); } @@ -8104,9 +8258,9 @@ uint32_t CompactionRequest::read(::apache::thrift::protocol::TProtocol* iprot) { break; case 4: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast354; - xfer += iprot->readI32(ecast354); - this->type = (CompactionType::type)ecast354; + int32_t ecast355; + xfer += iprot->readI32(ecast355); + this->type = (CompactionType::type)ecast355; isset_type = true; } else { xfer += iprot->skip(ftype); @@ -8281,9 +8435,9 @@ uint32_t ShowCompactResponseElement::read(::apache::thrift::protocol::TProtocol* break; case 4: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast355; - xfer += iprot->readI32(ecast355); - this->type = (CompactionType::type)ecast355; + int32_t ecast356; + xfer += iprot->readI32(ecast356); + this->type = (CompactionType::type)ecast356; isset_type = true; } else { xfer += iprot->skip(ftype); @@ -8430,14 +8584,14 @@ uint32_t ShowCompactResponse::read(::apache::thrift::protocol::TProtocol* iprot) if (ftype == ::apache::thrift::protocol::T_LIST) { { this->compacts.clear(); - uint32_t _size356; - ::apache::thrift::protocol::TType _etype359; - xfer += iprot->readListBegin(_etype359, _size356); - this->compacts.resize(_size356); - uint32_t _i360; - for (_i360 = 0; _i360 < _size356; ++_i360) + uint32_t _size357; + ::apache::thrift::protocol::TType _etype360; + xfer += iprot->readListBegin(_etype360, _size357); + this->compacts.resize(_size357); + uint32_t _i361; + for (_i361 = 0; _i361 < _size357; ++_i361) { - xfer += this->compacts[_i360].read(iprot); + xfer += this->compacts[_i361].read(iprot); } xfer += iprot->readListEnd(); } @@ -8467,10 +8621,10 @@ uint32_t ShowCompactResponse::write(::apache::thrift::protocol::TProtocol* oprot xfer += oprot->writeFieldBegin("compacts", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->compacts.size())); - std::vector ::const_iterator _iter361; - for (_iter361 = this->compacts.begin(); _iter361 != this->compacts.end(); ++_iter361) + std::vector ::const_iterator _iter362; + for (_iter362 = this->compacts.begin(); _iter362 != this->compacts.end(); ++_iter362) { - xfer += (*_iter361).write(oprot); + xfer += (*_iter362).write(oprot); } xfer += oprot->writeListEnd(); } diff --git metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h index 53c8edf..f352cd5 100644 --- metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h +++ metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h @@ -629,6 +629,114 @@ class PrincipalPrivilegeSet { void swap(PrincipalPrivilegeSet &a, PrincipalPrivilegeSet &b); +typedef struct _GrantRevokePrivilegeRequest__isset { + _GrantRevokePrivilegeRequest__isset() : requestType(false), privileges(false), revokeGrantOption(false) {} + bool requestType; + bool privileges; + bool revokeGrantOption; +} _GrantRevokePrivilegeRequest__isset; + +class GrantRevokePrivilegeRequest { + public: + + static const char* ascii_fingerprint; // = "DF474A3CB526AD40DC0F2C3702F7AA2C"; + static const uint8_t binary_fingerprint[16]; // = {0xDF,0x47,0x4A,0x3C,0xB5,0x26,0xAD,0x40,0xDC,0x0F,0x2C,0x37,0x02,0xF7,0xAA,0x2C}; + + GrantRevokePrivilegeRequest() : requestType((GrantRevokeType::type)0), revokeGrantOption(0) { + } + + virtual ~GrantRevokePrivilegeRequest() throw() {} + + GrantRevokeType::type requestType; + PrivilegeBag privileges; + bool revokeGrantOption; + + _GrantRevokePrivilegeRequest__isset __isset; + + void __set_requestType(const GrantRevokeType::type val) { + requestType = val; + } + + void __set_privileges(const PrivilegeBag& val) { + privileges = val; + } + + void __set_revokeGrantOption(const bool val) { + revokeGrantOption = val; + __isset.revokeGrantOption = true; + } + + bool operator == (const GrantRevokePrivilegeRequest & rhs) const + { + if (!(requestType == rhs.requestType)) + return false; + if (!(privileges == rhs.privileges)) + return false; + if (__isset.revokeGrantOption != rhs.__isset.revokeGrantOption) + return false; + else if (__isset.revokeGrantOption && !(revokeGrantOption == rhs.revokeGrantOption)) + return false; + return true; + } + bool operator != (const GrantRevokePrivilegeRequest &rhs) const { + return !(*this == rhs); + } + + bool operator < (const GrantRevokePrivilegeRequest & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +void swap(GrantRevokePrivilegeRequest &a, GrantRevokePrivilegeRequest &b); + +typedef struct _GrantRevokePrivilegeResponse__isset { + _GrantRevokePrivilegeResponse__isset() : success(false) {} + bool success; +} _GrantRevokePrivilegeResponse__isset; + +class GrantRevokePrivilegeResponse { + public: + + static const char* ascii_fingerprint; // = "BF054652DEF86253C2BEE7D947F167DD"; + static const uint8_t binary_fingerprint[16]; // = {0xBF,0x05,0x46,0x52,0xDE,0xF8,0x62,0x53,0xC2,0xBE,0xE7,0xD9,0x47,0xF1,0x67,0xDD}; + + GrantRevokePrivilegeResponse() : success(0) { + } + + virtual ~GrantRevokePrivilegeResponse() throw() {} + + bool success; + + _GrantRevokePrivilegeResponse__isset __isset; + + void __set_success(const bool val) { + success = val; + __isset.success = true; + } + + bool operator == (const GrantRevokePrivilegeResponse & rhs) const + { + if (__isset.success != rhs.__isset.success) + return false; + else if (__isset.success && !(success == rhs.success)) + return false; + return true; + } + bool operator != (const GrantRevokePrivilegeResponse &rhs) const { + return !(*this == rhs); + } + + bool operator < (const GrantRevokePrivilegeResponse & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +void swap(GrantRevokePrivilegeResponse &a, GrantRevokePrivilegeResponse &b); + typedef struct _Role__isset { _Role__isset() : roleName(false), createTime(false), ownerName(false) {} bool roleName; diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GrantRevokePrivilegeRequest.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GrantRevokePrivilegeRequest.java new file mode 100644 index 0000000..29ce977 --- /dev/null +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GrantRevokePrivilegeRequest.java @@ -0,0 +1,616 @@ +/** + * Autogenerated by Thrift Compiler (0.9.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hadoop.hive.metastore.api; + +import org.apache.commons.lang.builder.HashCodeBuilder; +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 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 org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class GrantRevokePrivilegeRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GrantRevokePrivilegeRequest"); + + private static final org.apache.thrift.protocol.TField REQUEST_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("requestType", org.apache.thrift.protocol.TType.I32, (short)1); + private static final org.apache.thrift.protocol.TField PRIVILEGES_FIELD_DESC = new org.apache.thrift.protocol.TField("privileges", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final org.apache.thrift.protocol.TField REVOKE_GRANT_OPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("revokeGrantOption", org.apache.thrift.protocol.TType.BOOL, (short)3); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new GrantRevokePrivilegeRequestStandardSchemeFactory()); + schemes.put(TupleScheme.class, new GrantRevokePrivilegeRequestTupleSchemeFactory()); + } + + private GrantRevokeType requestType; // required + private PrivilegeBag privileges; // required + private boolean revokeGrantOption; // 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 GrantRevokeType + */ + REQUEST_TYPE((short)1, "requestType"), + PRIVILEGES((short)2, "privileges"), + REVOKE_GRANT_OPTION((short)3, "revokeGrantOption"); + + 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: // REQUEST_TYPE + return REQUEST_TYPE; + case 2: // PRIVILEGES + return PRIVILEGES; + case 3: // REVOKE_GRANT_OPTION + return REVOKE_GRANT_OPTION; + 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 int __REVOKEGRANTOPTION_ISSET_ID = 0; + private byte __isset_bitfield = 0; + private _Fields optionals[] = {_Fields.REVOKE_GRANT_OPTION}; + 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.REQUEST_TYPE, new org.apache.thrift.meta_data.FieldMetaData("requestType", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, GrantRevokeType.class))); + tmpMap.put(_Fields.PRIVILEGES, new org.apache.thrift.meta_data.FieldMetaData("privileges", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PrivilegeBag.class))); + tmpMap.put(_Fields.REVOKE_GRANT_OPTION, new org.apache.thrift.meta_data.FieldMetaData("revokeGrantOption", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GrantRevokePrivilegeRequest.class, metaDataMap); + } + + public GrantRevokePrivilegeRequest() { + } + + public GrantRevokePrivilegeRequest( + GrantRevokeType requestType, + PrivilegeBag privileges) + { + this(); + this.requestType = requestType; + this.privileges = privileges; + } + + /** + * Performs a deep copy on other. + */ + public GrantRevokePrivilegeRequest(GrantRevokePrivilegeRequest other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetRequestType()) { + this.requestType = other.requestType; + } + if (other.isSetPrivileges()) { + this.privileges = new PrivilegeBag(other.privileges); + } + this.revokeGrantOption = other.revokeGrantOption; + } + + public GrantRevokePrivilegeRequest deepCopy() { + return new GrantRevokePrivilegeRequest(this); + } + + @Override + public void clear() { + this.requestType = null; + this.privileges = null; + setRevokeGrantOptionIsSet(false); + this.revokeGrantOption = false; + } + + /** + * + * @see GrantRevokeType + */ + public GrantRevokeType getRequestType() { + return this.requestType; + } + + /** + * + * @see GrantRevokeType + */ + public void setRequestType(GrantRevokeType requestType) { + this.requestType = requestType; + } + + public void unsetRequestType() { + this.requestType = null; + } + + /** Returns true if field requestType is set (has been assigned a value) and false otherwise */ + public boolean isSetRequestType() { + return this.requestType != null; + } + + public void setRequestTypeIsSet(boolean value) { + if (!value) { + this.requestType = null; + } + } + + public PrivilegeBag getPrivileges() { + return this.privileges; + } + + public void setPrivileges(PrivilegeBag privileges) { + this.privileges = privileges; + } + + public void unsetPrivileges() { + this.privileges = null; + } + + /** Returns true if field privileges is set (has been assigned a value) and false otherwise */ + public boolean isSetPrivileges() { + return this.privileges != null; + } + + public void setPrivilegesIsSet(boolean value) { + if (!value) { + this.privileges = null; + } + } + + public boolean isRevokeGrantOption() { + return this.revokeGrantOption; + } + + public void setRevokeGrantOption(boolean revokeGrantOption) { + this.revokeGrantOption = revokeGrantOption; + setRevokeGrantOptionIsSet(true); + } + + public void unsetRevokeGrantOption() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REVOKEGRANTOPTION_ISSET_ID); + } + + /** Returns true if field revokeGrantOption is set (has been assigned a value) and false otherwise */ + public boolean isSetRevokeGrantOption() { + return EncodingUtils.testBit(__isset_bitfield, __REVOKEGRANTOPTION_ISSET_ID); + } + + public void setRevokeGrantOptionIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REVOKEGRANTOPTION_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case REQUEST_TYPE: + if (value == null) { + unsetRequestType(); + } else { + setRequestType((GrantRevokeType)value); + } + break; + + case PRIVILEGES: + if (value == null) { + unsetPrivileges(); + } else { + setPrivileges((PrivilegeBag)value); + } + break; + + case REVOKE_GRANT_OPTION: + if (value == null) { + unsetRevokeGrantOption(); + } else { + setRevokeGrantOption((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case REQUEST_TYPE: + return getRequestType(); + + case PRIVILEGES: + return getPrivileges(); + + case REVOKE_GRANT_OPTION: + return Boolean.valueOf(isRevokeGrantOption()); + + } + 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 REQUEST_TYPE: + return isSetRequestType(); + case PRIVILEGES: + return isSetPrivileges(); + case REVOKE_GRANT_OPTION: + return isSetRevokeGrantOption(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof GrantRevokePrivilegeRequest) + return this.equals((GrantRevokePrivilegeRequest)that); + return false; + } + + public boolean equals(GrantRevokePrivilegeRequest that) { + if (that == null) + return false; + + boolean this_present_requestType = true && this.isSetRequestType(); + boolean that_present_requestType = true && that.isSetRequestType(); + if (this_present_requestType || that_present_requestType) { + if (!(this_present_requestType && that_present_requestType)) + return false; + if (!this.requestType.equals(that.requestType)) + return false; + } + + boolean this_present_privileges = true && this.isSetPrivileges(); + boolean that_present_privileges = true && that.isSetPrivileges(); + if (this_present_privileges || that_present_privileges) { + if (!(this_present_privileges && that_present_privileges)) + return false; + if (!this.privileges.equals(that.privileges)) + return false; + } + + boolean this_present_revokeGrantOption = true && this.isSetRevokeGrantOption(); + boolean that_present_revokeGrantOption = true && that.isSetRevokeGrantOption(); + if (this_present_revokeGrantOption || that_present_revokeGrantOption) { + if (!(this_present_revokeGrantOption && that_present_revokeGrantOption)) + return false; + if (this.revokeGrantOption != that.revokeGrantOption) + return false; + } + + return true; + } + + @Override + public int hashCode() { + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_requestType = true && (isSetRequestType()); + builder.append(present_requestType); + if (present_requestType) + builder.append(requestType.getValue()); + + boolean present_privileges = true && (isSetPrivileges()); + builder.append(present_privileges); + if (present_privileges) + builder.append(privileges); + + boolean present_revokeGrantOption = true && (isSetRevokeGrantOption()); + builder.append(present_revokeGrantOption); + if (present_revokeGrantOption) + builder.append(revokeGrantOption); + + return builder.toHashCode(); + } + + public int compareTo(GrantRevokePrivilegeRequest other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + GrantRevokePrivilegeRequest typedOther = (GrantRevokePrivilegeRequest)other; + + lastComparison = Boolean.valueOf(isSetRequestType()).compareTo(typedOther.isSetRequestType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRequestType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.requestType, typedOther.requestType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPrivileges()).compareTo(typedOther.isSetPrivileges()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrivileges()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.privileges, typedOther.privileges); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRevokeGrantOption()).compareTo(typedOther.isSetRevokeGrantOption()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRevokeGrantOption()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.revokeGrantOption, typedOther.revokeGrantOption); + 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("GrantRevokePrivilegeRequest("); + boolean first = true; + + sb.append("requestType:"); + if (this.requestType == null) { + sb.append("null"); + } else { + sb.append(this.requestType); + } + first = false; + if (!first) sb.append(", "); + sb.append("privileges:"); + if (this.privileges == null) { + sb.append("null"); + } else { + sb.append(this.privileges); + } + first = false; + if (isSetRevokeGrantOption()) { + if (!first) sb.append(", "); + sb.append("revokeGrantOption:"); + sb.append(this.revokeGrantOption); + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (privileges != null) { + privileges.validate(); + } + } + + 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 { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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 GrantRevokePrivilegeRequestStandardSchemeFactory implements SchemeFactory { + public GrantRevokePrivilegeRequestStandardScheme getScheme() { + return new GrantRevokePrivilegeRequestStandardScheme(); + } + } + + private static class GrantRevokePrivilegeRequestStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, GrantRevokePrivilegeRequest 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: // REQUEST_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.requestType = GrantRevokeType.findByValue(iprot.readI32()); + struct.setRequestTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // PRIVILEGES + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.privileges = new PrivilegeBag(); + struct.privileges.read(iprot); + struct.setPrivilegesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // REVOKE_GRANT_OPTION + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.revokeGrantOption = iprot.readBool(); + struct.setRevokeGrantOptionIsSet(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, GrantRevokePrivilegeRequest struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.requestType != null) { + oprot.writeFieldBegin(REQUEST_TYPE_FIELD_DESC); + oprot.writeI32(struct.requestType.getValue()); + oprot.writeFieldEnd(); + } + if (struct.privileges != null) { + oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); + struct.privileges.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.isSetRevokeGrantOption()) { + oprot.writeFieldBegin(REVOKE_GRANT_OPTION_FIELD_DESC); + oprot.writeBool(struct.revokeGrantOption); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class GrantRevokePrivilegeRequestTupleSchemeFactory implements SchemeFactory { + public GrantRevokePrivilegeRequestTupleScheme getScheme() { + return new GrantRevokePrivilegeRequestTupleScheme(); + } + } + + private static class GrantRevokePrivilegeRequestTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, GrantRevokePrivilegeRequest struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRequestType()) { + optionals.set(0); + } + if (struct.isSetPrivileges()) { + optionals.set(1); + } + if (struct.isSetRevokeGrantOption()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetRequestType()) { + oprot.writeI32(struct.requestType.getValue()); + } + if (struct.isSetPrivileges()) { + struct.privileges.write(oprot); + } + if (struct.isSetRevokeGrantOption()) { + oprot.writeBool(struct.revokeGrantOption); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, GrantRevokePrivilegeRequest struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.requestType = GrantRevokeType.findByValue(iprot.readI32()); + struct.setRequestTypeIsSet(true); + } + if (incoming.get(1)) { + struct.privileges = new PrivilegeBag(); + struct.privileges.read(iprot); + struct.setPrivilegesIsSet(true); + } + if (incoming.get(2)) { + struct.revokeGrantOption = iprot.readBool(); + struct.setRevokeGrantOptionIsSet(true); + } + } + } + +} + diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GrantRevokePrivilegeResponse.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GrantRevokePrivilegeResponse.java new file mode 100644 index 0000000..f86bf9f --- /dev/null +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GrantRevokePrivilegeResponse.java @@ -0,0 +1,386 @@ +/** + * Autogenerated by Thrift Compiler (0.9.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hadoop.hive.metastore.api; + +import org.apache.commons.lang.builder.HashCodeBuilder; +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 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 org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class GrantRevokePrivilegeResponse implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GrantRevokePrivilegeResponse"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new GrantRevokePrivilegeResponseStandardSchemeFactory()); + schemes.put(TupleScheme.class, new GrantRevokePrivilegeResponseTupleSchemeFactory()); + } + + private boolean success; // 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 { + SUCCESS((short)1, "success"); + + 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: // SUCCESS + return SUCCESS; + 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 int __SUCCESS_ISSET_ID = 0; + private byte __isset_bitfield = 0; + private _Fields optionals[] = {_Fields.SUCCESS}; + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GrantRevokePrivilegeResponse.class, metaDataMap); + } + + public GrantRevokePrivilegeResponse() { + } + + /** + * Performs a deep copy on other. + */ + public GrantRevokePrivilegeResponse(GrantRevokePrivilegeResponse other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + } + + public GrantRevokePrivilegeResponse deepCopy() { + return new GrantRevokePrivilegeResponse(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + } + + public boolean isSuccess() { + return this.success; + } + + public void setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + } + + public void unsetSuccess() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return Boolean.valueOf(isSuccess()); + + } + 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 SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof GrantRevokePrivilegeResponse) + return this.equals((GrantRevokePrivilegeResponse)that); + return false; + } + + public boolean equals(GrantRevokePrivilegeResponse that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + return true; + } + + @Override + public int hashCode() { + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_success = true && (isSetSuccess()); + builder.append(present_success); + if (present_success) + builder.append(success); + + return builder.toHashCode(); + } + + public int compareTo(GrantRevokePrivilegeResponse other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + GrantRevokePrivilegeResponse typedOther = (GrantRevokePrivilegeResponse)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + 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("GrantRevokePrivilegeResponse("); + boolean first = true; + + if (isSetSuccess()) { + sb.append("success:"); + sb.append(this.success); + 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 { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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 GrantRevokePrivilegeResponseStandardSchemeFactory implements SchemeFactory { + public GrantRevokePrivilegeResponseStandardScheme getScheme() { + return new GrantRevokePrivilegeResponseStandardScheme(); + } + } + + private static class GrantRevokePrivilegeResponseStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, GrantRevokePrivilegeResponse 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: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(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, GrantRevokePrivilegeResponse struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class GrantRevokePrivilegeResponseTupleSchemeFactory implements SchemeFactory { + public GrantRevokePrivilegeResponseTupleScheme getScheme() { + return new GrantRevokePrivilegeResponseTupleScheme(); + } + } + + private static class GrantRevokePrivilegeResponseTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, GrantRevokePrivilegeResponse struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, GrantRevokePrivilegeResponse struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + } + } + +} + diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java index e99fafe..1e0cdea 100644 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java @@ -220,6 +220,8 @@ public boolean revoke_privileges(PrivilegeBag privileges) throws MetaException, org.apache.thrift.TException; + public GrantRevokePrivilegeResponse grant_revoke_privileges(GrantRevokePrivilegeRequest request) throws MetaException, org.apache.thrift.TException; + public List set_ugi(String user_name, List group_names) throws MetaException, org.apache.thrift.TException; public String get_delegation_token(String token_owner, String renewer_kerberos_principal_name) throws MetaException, org.apache.thrift.TException; @@ -440,6 +442,8 @@ public void revoke_privileges(PrivilegeBag privileges, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void grant_revoke_privileges(GrantRevokePrivilegeRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void set_ugi(String user_name, List group_names, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void get_delegation_token(String token_owner, String renewer_kerberos_principal_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; @@ -3276,6 +3280,32 @@ public boolean recv_revoke_privileges() throws MetaException, org.apache.thrift. throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "revoke_privileges failed: unknown result"); } + public GrantRevokePrivilegeResponse grant_revoke_privileges(GrantRevokePrivilegeRequest request) throws MetaException, org.apache.thrift.TException + { + send_grant_revoke_privileges(request); + return recv_grant_revoke_privileges(); + } + + public void send_grant_revoke_privileges(GrantRevokePrivilegeRequest request) throws org.apache.thrift.TException + { + grant_revoke_privileges_args args = new grant_revoke_privileges_args(); + args.setRequest(request); + sendBase("grant_revoke_privileges", args); + } + + public GrantRevokePrivilegeResponse recv_grant_revoke_privileges() throws MetaException, org.apache.thrift.TException + { + grant_revoke_privileges_result result = new grant_revoke_privileges_result(); + receiveBase(result, "grant_revoke_privileges"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "grant_revoke_privileges failed: unknown result"); + } + public List set_ugi(String user_name, List group_names) throws MetaException, org.apache.thrift.TException { send_set_ugi(user_name, group_names); @@ -7044,6 +7074,38 @@ public boolean getResult() throws MetaException, org.apache.thrift.TException { } } + public void grant_revoke_privileges(GrantRevokePrivilegeRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + grant_revoke_privileges_call method_call = new grant_revoke_privileges_call(request, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class grant_revoke_privileges_call extends org.apache.thrift.async.TAsyncMethodCall { + private GrantRevokePrivilegeRequest request; + public grant_revoke_privileges_call(GrantRevokePrivilegeRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.request = request; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("grant_revoke_privileges", org.apache.thrift.protocol.TMessageType.CALL, 0)); + grant_revoke_privileges_args args = new grant_revoke_privileges_args(); + args.setRequest(request); + args.write(prot); + prot.writeMessageEnd(); + } + + public GrantRevokePrivilegeResponse getResult() throws MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_grant_revoke_privileges(); + } + } + public void set_ugi(String user_name, List group_names, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); set_ugi_call method_call = new set_ugi_call(user_name, group_names, resultHandler, this, ___protocolFactory, ___transport); @@ -7692,6 +7754,7 @@ protected Processor(I iface, Map extends org.apache.thrift.ProcessFunction { + public grant_revoke_privileges() { + super("grant_revoke_privileges"); + } + + public grant_revoke_privileges_args getEmptyArgsInstance() { + return new grant_revoke_privileges_args(); + } + + protected boolean isOneway() { + return false; + } + + public grant_revoke_privileges_result getResult(I iface, grant_revoke_privileges_args args) throws org.apache.thrift.TException { + grant_revoke_privileges_result result = new grant_revoke_privileges_result(); + try { + result.success = iface.grant_revoke_privileges(args.request); + } catch (MetaException o1) { + result.o1 = o1; + } + return result; + } + } + public static class set_ugi extends org.apache.thrift.ProcessFunction { public set_ugi() { super("set_ugi"); @@ -110028,30 +110115,957 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("list_privileges_args("); + StringBuilder sb = new StringBuilder("list_privileges_args("); + boolean first = true; + + sb.append("principal_name:"); + if (this.principal_name == null) { + sb.append("null"); + } else { + sb.append(this.principal_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("principal_type:"); + if (this.principal_type == null) { + sb.append("null"); + } else { + sb.append(this.principal_type); + } + first = false; + if (!first) sb.append(", "); + sb.append("hiveObject:"); + if (this.hiveObject == null) { + sb.append("null"); + } else { + sb.append(this.hiveObject); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (hiveObject != null) { + hiveObject.validate(); + } + } + + 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 list_privileges_argsStandardSchemeFactory implements SchemeFactory { + public list_privileges_argsStandardScheme getScheme() { + return new list_privileges_argsStandardScheme(); + } + } + + private static class list_privileges_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, list_privileges_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // PRINCIPAL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.principal_name = iprot.readString(); + struct.setPrincipal_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // PRINCIPAL_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.principal_type = PrincipalType.findByValue(iprot.readI32()); + struct.setPrincipal_typeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // HIVE_OBJECT + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.hiveObject = new HiveObjectRef(); + struct.hiveObject.read(iprot); + struct.setHiveObjectIsSet(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, list_privileges_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.principal_name != null) { + oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); + oprot.writeString(struct.principal_name); + oprot.writeFieldEnd(); + } + if (struct.principal_type != null) { + oprot.writeFieldBegin(PRINCIPAL_TYPE_FIELD_DESC); + oprot.writeI32(struct.principal_type.getValue()); + oprot.writeFieldEnd(); + } + if (struct.hiveObject != null) { + oprot.writeFieldBegin(HIVE_OBJECT_FIELD_DESC); + struct.hiveObject.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class list_privileges_argsTupleSchemeFactory implements SchemeFactory { + public list_privileges_argsTupleScheme getScheme() { + return new list_privileges_argsTupleScheme(); + } + } + + private static class list_privileges_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, list_privileges_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetPrincipal_name()) { + optionals.set(0); + } + if (struct.isSetPrincipal_type()) { + optionals.set(1); + } + if (struct.isSetHiveObject()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetPrincipal_name()) { + oprot.writeString(struct.principal_name); + } + if (struct.isSetPrincipal_type()) { + oprot.writeI32(struct.principal_type.getValue()); + } + if (struct.isSetHiveObject()) { + struct.hiveObject.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, list_privileges_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.principal_name = iprot.readString(); + struct.setPrincipal_nameIsSet(true); + } + if (incoming.get(1)) { + struct.principal_type = PrincipalType.findByValue(iprot.readI32()); + struct.setPrincipal_typeIsSet(true); + } + if (incoming.get(2)) { + struct.hiveObject = new HiveObjectRef(); + struct.hiveObject.read(iprot); + struct.setHiveObjectIsSet(true); + } + } + } + + } + + public static class list_privileges_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("list_privileges_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new list_privileges_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new list_privileges_resultTupleSchemeFactory()); + } + + private List success; // required + private MetaException o1; // 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 { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + 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 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HiveObjectPrivilege.class)))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(list_privileges_result.class, metaDataMap); + } + + public list_privileges_result() { + } + + public list_privileges_result( + List success, + MetaException o1) + { + this(); + this.success = success; + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public list_privileges_result(list_privileges_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (HiveObjectPrivilege other_element : other.success) { + __this__success.add(new HiveObjectPrivilege(other_element)); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public list_privileges_result deepCopy() { + return new list_privileges_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(HiveObjectPrivilege elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + } + 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 SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof list_privileges_result) + return this.equals((list_privileges_result)that); + return false; + } + + public boolean equals(list_privileges_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_success = true && (isSetSuccess()); + builder.append(present_success); + if (present_success) + builder.append(success); + + boolean present_o1 = true && (isSetO1()); + builder.append(present_o1); + if (present_o1) + builder.append(o1); + + return builder.toHashCode(); + } + + public int compareTo(list_privileges_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + list_privileges_result typedOther = (list_privileges_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); + 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("list_privileges_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + 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 list_privileges_resultStandardSchemeFactory implements SchemeFactory { + public list_privileges_resultStandardScheme getScheme() { + return new list_privileges_resultStandardScheme(); + } + } + + private static class list_privileges_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, list_privileges_result 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 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list820 = iprot.readListBegin(); + struct.success = new ArrayList(_list820.size); + for (int _i821 = 0; _i821 < _list820.size; ++_i821) + { + HiveObjectPrivilege _elem822; // optional + _elem822 = new HiveObjectPrivilege(); + _elem822.read(iprot); + struct.success.add(_elem822); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(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, list_privileges_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (HiveObjectPrivilege _iter823 : struct.success) + { + _iter823.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class list_privileges_resultTupleSchemeFactory implements SchemeFactory { + public list_privileges_resultTupleScheme getScheme() { + return new list_privileges_resultTupleScheme(); + } + } + + private static class list_privileges_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, list_privileges_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (HiveObjectPrivilege _iter824 : struct.success) + { + _iter824.write(oprot); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, list_privileges_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list825 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list825.size); + for (int _i826 = 0; _i826 < _list825.size; ++_i826) + { + HiveObjectPrivilege _elem827; // optional + _elem827 = new HiveObjectPrivilege(); + _elem827.read(iprot); + struct.success.add(_elem827); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + + } + + public static class grant_privileges_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("grant_privileges_args"); + + private static final org.apache.thrift.protocol.TField PRIVILEGES_FIELD_DESC = new org.apache.thrift.protocol.TField("privileges", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new grant_privileges_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new grant_privileges_argsTupleSchemeFactory()); + } + + private PrivilegeBag privileges; // 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 { + PRIVILEGES((short)1, "privileges"); + + 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: // PRIVILEGES + return PRIVILEGES; + 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.PRIVILEGES, new org.apache.thrift.meta_data.FieldMetaData("privileges", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PrivilegeBag.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(grant_privileges_args.class, metaDataMap); + } + + public grant_privileges_args() { + } + + public grant_privileges_args( + PrivilegeBag privileges) + { + this(); + this.privileges = privileges; + } + + /** + * Performs a deep copy on other. + */ + public grant_privileges_args(grant_privileges_args other) { + if (other.isSetPrivileges()) { + this.privileges = new PrivilegeBag(other.privileges); + } + } + + public grant_privileges_args deepCopy() { + return new grant_privileges_args(this); + } + + @Override + public void clear() { + this.privileges = null; + } + + public PrivilegeBag getPrivileges() { + return this.privileges; + } + + public void setPrivileges(PrivilegeBag privileges) { + this.privileges = privileges; + } + + public void unsetPrivileges() { + this.privileges = null; + } + + /** Returns true if field privileges is set (has been assigned a value) and false otherwise */ + public boolean isSetPrivileges() { + return this.privileges != null; + } + + public void setPrivilegesIsSet(boolean value) { + if (!value) { + this.privileges = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case PRIVILEGES: + if (value == null) { + unsetPrivileges(); + } else { + setPrivileges((PrivilegeBag)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case PRIVILEGES: + return getPrivileges(); + + } + 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 PRIVILEGES: + return isSetPrivileges(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof grant_privileges_args) + return this.equals((grant_privileges_args)that); + return false; + } + + public boolean equals(grant_privileges_args that) { + if (that == null) + return false; + + boolean this_present_privileges = true && this.isSetPrivileges(); + boolean that_present_privileges = true && that.isSetPrivileges(); + if (this_present_privileges || that_present_privileges) { + if (!(this_present_privileges && that_present_privileges)) + return false; + if (!this.privileges.equals(that.privileges)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_privileges = true && (isSetPrivileges()); + builder.append(present_privileges); + if (present_privileges) + builder.append(privileges); + + return builder.toHashCode(); + } + + public int compareTo(grant_privileges_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + grant_privileges_args typedOther = (grant_privileges_args)other; + + lastComparison = Boolean.valueOf(isSetPrivileges()).compareTo(typedOther.isSetPrivileges()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrivileges()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.privileges, typedOther.privileges); + 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("grant_privileges_args("); boolean first = true; - sb.append("principal_name:"); - if (this.principal_name == null) { - sb.append("null"); - } else { - sb.append(this.principal_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("principal_type:"); - if (this.principal_type == null) { - sb.append("null"); - } else { - sb.append(this.principal_type); - } - first = false; - if (!first) sb.append(", "); - sb.append("hiveObject:"); - if (this.hiveObject == null) { + sb.append("privileges:"); + if (this.privileges == null) { sb.append("null"); } else { - sb.append(this.hiveObject); + sb.append(this.privileges); } first = false; sb.append(")"); @@ -110061,8 +111075,8 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity - if (hiveObject != null) { - hiveObject.validate(); + if (privileges != null) { + privileges.validate(); } } @@ -110082,15 +111096,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class list_privileges_argsStandardSchemeFactory implements SchemeFactory { - public list_privileges_argsStandardScheme getScheme() { - return new list_privileges_argsStandardScheme(); + private static class grant_privileges_argsStandardSchemeFactory implements SchemeFactory { + public grant_privileges_argsStandardScheme getScheme() { + return new grant_privileges_argsStandardScheme(); } } - private static class list_privileges_argsStandardScheme extends StandardScheme { + private static class grant_privileges_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, list_privileges_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, grant_privileges_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -110100,27 +111114,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, list_privileges_arg break; } switch (schemeField.id) { - case 1: // PRINCIPAL_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.principal_name = iprot.readString(); - struct.setPrincipal_nameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // PRINCIPAL_TYPE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.principal_type = PrincipalType.findByValue(iprot.readI32()); - struct.setPrincipal_typeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // HIVE_OBJECT + case 1: // PRIVILEGES if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.hiveObject = new HiveObjectRef(); - struct.hiveObject.read(iprot); - struct.setHiveObjectIsSet(true); + struct.privileges = new PrivilegeBag(); + struct.privileges.read(iprot); + struct.setPrivilegesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -110134,23 +111132,13 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, list_privileges_arg struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, list_privileges_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, grant_privileges_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.principal_name != null) { - oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); - oprot.writeString(struct.principal_name); - oprot.writeFieldEnd(); - } - if (struct.principal_type != null) { - oprot.writeFieldBegin(PRINCIPAL_TYPE_FIELD_DESC); - oprot.writeI32(struct.principal_type.getValue()); - oprot.writeFieldEnd(); - } - if (struct.hiveObject != null) { - oprot.writeFieldBegin(HIVE_OBJECT_FIELD_DESC); - struct.hiveObject.write(oprot); + if (struct.privileges != null) { + oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); + struct.privileges.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -110159,74 +111147,54 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, list_privileges_ar } - private static class list_privileges_argsTupleSchemeFactory implements SchemeFactory { - public list_privileges_argsTupleScheme getScheme() { - return new list_privileges_argsTupleScheme(); + private static class grant_privileges_argsTupleSchemeFactory implements SchemeFactory { + public grant_privileges_argsTupleScheme getScheme() { + return new grant_privileges_argsTupleScheme(); } } - private static class list_privileges_argsTupleScheme extends TupleScheme { + private static class grant_privileges_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, list_privileges_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, grant_privileges_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetPrincipal_name()) { + if (struct.isSetPrivileges()) { optionals.set(0); } - if (struct.isSetPrincipal_type()) { - optionals.set(1); - } - if (struct.isSetHiveObject()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetPrincipal_name()) { - oprot.writeString(struct.principal_name); - } - if (struct.isSetPrincipal_type()) { - oprot.writeI32(struct.principal_type.getValue()); - } - if (struct.isSetHiveObject()) { - struct.hiveObject.write(oprot); + oprot.writeBitSet(optionals, 1); + if (struct.isSetPrivileges()) { + struct.privileges.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, list_privileges_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, grant_privileges_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); + BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.principal_name = iprot.readString(); - struct.setPrincipal_nameIsSet(true); - } - if (incoming.get(1)) { - struct.principal_type = PrincipalType.findByValue(iprot.readI32()); - struct.setPrincipal_typeIsSet(true); - } - if (incoming.get(2)) { - struct.hiveObject = new HiveObjectRef(); - struct.hiveObject.read(iprot); - struct.setHiveObjectIsSet(true); + struct.privileges = new PrivilegeBag(); + struct.privileges.read(iprot); + struct.setPrivilegesIsSet(true); } } } } - public static class list_privileges_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("list_privileges_result"); + public static class grant_privileges_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("grant_privileges_result"); - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new list_privileges_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new list_privileges_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new grant_privileges_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new grant_privileges_resultTupleSchemeFactory()); } - private List success; // required + private boolean success; // required private MetaException o1; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -110291,92 +111259,74 @@ public String getFieldName() { } // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private byte __isset_bitfield = 0; 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HiveObjectPrivilege.class)))); + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(list_privileges_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(grant_privileges_result.class, metaDataMap); } - public list_privileges_result() { + public grant_privileges_result() { } - public list_privileges_result( - List success, + public grant_privileges_result( + boolean success, MetaException o1) { this(); this.success = success; + setSuccessIsSet(true); this.o1 = o1; } /** * Performs a deep copy on other. */ - public list_privileges_result(list_privileges_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(); - for (HiveObjectPrivilege other_element : other.success) { - __this__success.add(new HiveObjectPrivilege(other_element)); - } - this.success = __this__success; - } + public grant_privileges_result(grant_privileges_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } } - public list_privileges_result deepCopy() { - return new list_privileges_result(this); + public grant_privileges_result deepCopy() { + return new grant_privileges_result(this); } @Override public void clear() { - this.success = null; + setSuccessIsSet(false); + this.success = false; this.o1 = null; } - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(HiveObjectPrivilege elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { + public boolean isSuccess() { return this.success; } - public void setSuccess(List success) { + public void setSuccess(boolean success) { this.success = success; + setSuccessIsSet(true); } public void unsetSuccess() { - this.success = null; + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return this.success != null; + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public MetaException getO1() { @@ -110408,7 +111358,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetSuccess(); } else { - setSuccess((List)value); + setSuccess((Boolean)value); } break; @@ -110426,7 +111376,7 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: - return getSuccess(); + return Boolean.valueOf(isSuccess()); case O1: return getO1(); @@ -110454,21 +111404,21 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof list_privileges_result) - return this.equals((list_privileges_result)that); + if (that instanceof grant_privileges_result) + return this.equals((grant_privileges_result)that); return false; } - public boolean equals(list_privileges_result that) { + public boolean equals(grant_privileges_result that) { if (that == null) return false; - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); + boolean this_present_success = true; + boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; - if (!this.success.equals(that.success)) + if (this.success != that.success) return false; } @@ -110488,7 +111438,7 @@ public boolean equals(list_privileges_result that) { public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); - boolean present_success = true && (isSetSuccess()); + boolean present_success = true; builder.append(present_success); if (present_success) builder.append(success); @@ -110501,13 +111451,13 @@ public int hashCode() { return builder.toHashCode(); } - public int compareTo(list_privileges_result other) { + public int compareTo(grant_privileges_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - list_privileges_result typedOther = (list_privileges_result)other; + grant_privileges_result typedOther = (grant_privileges_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { @@ -110546,15 +111496,11 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("list_privileges_result("); + StringBuilder sb = new StringBuilder("grant_privileges_result("); boolean first = true; sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } + sb.append(this.success); first = false; if (!first) sb.append(", "); sb.append("o1:"); @@ -110583,21 +111529,23 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; 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 list_privileges_resultStandardSchemeFactory implements SchemeFactory { - public list_privileges_resultStandardScheme getScheme() { - return new list_privileges_resultStandardScheme(); + private static class grant_privileges_resultStandardSchemeFactory implements SchemeFactory { + public grant_privileges_resultStandardScheme getScheme() { + return new grant_privileges_resultStandardScheme(); } } - private static class list_privileges_resultStandardScheme extends StandardScheme { + private static class grant_privileges_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, list_privileges_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, grant_privileges_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -110608,19 +111556,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, list_privileges_res } switch (schemeField.id) { case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list820 = iprot.readListBegin(); - struct.success = new ArrayList(_list820.size); - for (int _i821 = 0; _i821 < _list820.size; ++_i821) - { - HiveObjectPrivilege _elem822; // optional - _elem822 = new HiveObjectPrivilege(); - _elem822.read(iprot); - struct.success.add(_elem822); - } - iprot.readListEnd(); - } + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); @@ -110644,20 +111581,13 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, list_privileges_res struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, list_privileges_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, grant_privileges_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { + if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (HiveObjectPrivilege _iter823 : struct.success) - { - _iter823.write(oprot); - } - oprot.writeListEnd(); - } + oprot.writeBool(struct.success); oprot.writeFieldEnd(); } if (struct.o1 != null) { @@ -110671,16 +111601,16 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, list_privileges_re } - private static class list_privileges_resultTupleSchemeFactory implements SchemeFactory { - public list_privileges_resultTupleScheme getScheme() { - return new list_privileges_resultTupleScheme(); + private static class grant_privileges_resultTupleSchemeFactory implements SchemeFactory { + public grant_privileges_resultTupleScheme getScheme() { + return new grant_privileges_resultTupleScheme(); } } - private static class list_privileges_resultTupleScheme extends TupleScheme { + private static class grant_privileges_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, list_privileges_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, grant_privileges_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { @@ -110691,13 +111621,7 @@ public void write(org.apache.thrift.protocol.TProtocol prot, list_privileges_res } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { - { - oprot.writeI32(struct.success.size()); - for (HiveObjectPrivilege _iter824 : struct.success) - { - _iter824.write(oprot); - } - } + oprot.writeBool(struct.success); } if (struct.isSetO1()) { struct.o1.write(oprot); @@ -110705,21 +111629,11 @@ public void write(org.apache.thrift.protocol.TProtocol prot, list_privileges_res } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, list_privileges_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, grant_privileges_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - { - org.apache.thrift.protocol.TList _list825 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list825.size); - for (int _i826 = 0; _i826 < _list825.size; ++_i826) - { - HiveObjectPrivilege _elem827; // optional - _elem827 = new HiveObjectPrivilege(); - _elem827.read(iprot); - struct.success.add(_elem827); - } - } + struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { @@ -110732,15 +111646,15 @@ public void read(org.apache.thrift.protocol.TProtocol prot, list_privileges_resu } - public static class grant_privileges_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("grant_privileges_args"); + public static class revoke_privileges_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("revoke_privileges_args"); private static final org.apache.thrift.protocol.TField PRIVILEGES_FIELD_DESC = new org.apache.thrift.protocol.TField("privileges", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new grant_privileges_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new grant_privileges_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new revoke_privileges_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new revoke_privileges_argsTupleSchemeFactory()); } private PrivilegeBag privileges; // required @@ -110810,13 +111724,13 @@ public String getFieldName() { tmpMap.put(_Fields.PRIVILEGES, new org.apache.thrift.meta_data.FieldMetaData("privileges", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PrivilegeBag.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(grant_privileges_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(revoke_privileges_args.class, metaDataMap); } - public grant_privileges_args() { + public revoke_privileges_args() { } - public grant_privileges_args( + public revoke_privileges_args( PrivilegeBag privileges) { this(); @@ -110826,14 +111740,14 @@ public grant_privileges_args( /** * Performs a deep copy on other. */ - public grant_privileges_args(grant_privileges_args other) { + public revoke_privileges_args(revoke_privileges_args other) { if (other.isSetPrivileges()) { this.privileges = new PrivilegeBag(other.privileges); } } - public grant_privileges_args deepCopy() { - return new grant_privileges_args(this); + public revoke_privileges_args deepCopy() { + return new revoke_privileges_args(this); } @Override @@ -110903,12 +111817,12 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof grant_privileges_args) - return this.equals((grant_privileges_args)that); + if (that instanceof revoke_privileges_args) + return this.equals((revoke_privileges_args)that); return false; } - public boolean equals(grant_privileges_args that) { + public boolean equals(revoke_privileges_args that) { if (that == null) return false; @@ -110936,13 +111850,13 @@ public int hashCode() { return builder.toHashCode(); } - public int compareTo(grant_privileges_args other) { + public int compareTo(revoke_privileges_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - grant_privileges_args typedOther = (grant_privileges_args)other; + revoke_privileges_args typedOther = (revoke_privileges_args)other; lastComparison = Boolean.valueOf(isSetPrivileges()).compareTo(typedOther.isSetPrivileges()); if (lastComparison != 0) { @@ -110971,7 +111885,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("grant_privileges_args("); + StringBuilder sb = new StringBuilder("revoke_privileges_args("); boolean first = true; sb.append("privileges:"); @@ -111009,15 +111923,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class grant_privileges_argsStandardSchemeFactory implements SchemeFactory { - public grant_privileges_argsStandardScheme getScheme() { - return new grant_privileges_argsStandardScheme(); + private static class revoke_privileges_argsStandardSchemeFactory implements SchemeFactory { + public revoke_privileges_argsStandardScheme getScheme() { + return new revoke_privileges_argsStandardScheme(); } } - private static class grant_privileges_argsStandardScheme extends StandardScheme { + private static class revoke_privileges_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, grant_privileges_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, revoke_privileges_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -111045,7 +111959,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, grant_privileges_ar struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, grant_privileges_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, revoke_privileges_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -111060,16 +111974,16 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, grant_privileges_a } - private static class grant_privileges_argsTupleSchemeFactory implements SchemeFactory { - public grant_privileges_argsTupleScheme getScheme() { - return new grant_privileges_argsTupleScheme(); + private static class revoke_privileges_argsTupleSchemeFactory implements SchemeFactory { + public revoke_privileges_argsTupleScheme getScheme() { + return new revoke_privileges_argsTupleScheme(); } } - private static class grant_privileges_argsTupleScheme extends TupleScheme { + private static class revoke_privileges_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, grant_privileges_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, revoke_privileges_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetPrivileges()) { @@ -111082,7 +111996,7 @@ public void write(org.apache.thrift.protocol.TProtocol prot, grant_privileges_ar } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, grant_privileges_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, revoke_privileges_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { @@ -111095,16 +112009,16 @@ public void read(org.apache.thrift.protocol.TProtocol prot, grant_privileges_arg } - public static class grant_privileges_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("grant_privileges_result"); + public static class revoke_privileges_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("revoke_privileges_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new grant_privileges_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new grant_privileges_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new revoke_privileges_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new revoke_privileges_resultTupleSchemeFactory()); } private boolean success; // required @@ -111182,13 +112096,13 @@ public String getFieldName() { tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(grant_privileges_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(revoke_privileges_result.class, metaDataMap); } - public grant_privileges_result() { + public revoke_privileges_result() { } - public grant_privileges_result( + public revoke_privileges_result( boolean success, MetaException o1) { @@ -111201,7 +112115,7 @@ public grant_privileges_result( /** * Performs a deep copy on other. */ - public grant_privileges_result(grant_privileges_result other) { + public revoke_privileges_result(revoke_privileges_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { @@ -111209,8 +112123,8 @@ public grant_privileges_result(grant_privileges_result other) { } } - public grant_privileges_result deepCopy() { - return new grant_privileges_result(this); + public revoke_privileges_result deepCopy() { + return new revoke_privileges_result(this); } @Override @@ -111317,12 +112231,12 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof grant_privileges_result) - return this.equals((grant_privileges_result)that); + if (that instanceof revoke_privileges_result) + return this.equals((revoke_privileges_result)that); return false; } - public boolean equals(grant_privileges_result that) { + public boolean equals(revoke_privileges_result that) { if (that == null) return false; @@ -111364,13 +112278,13 @@ public int hashCode() { return builder.toHashCode(); } - public int compareTo(grant_privileges_result other) { + public int compareTo(revoke_privileges_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - grant_privileges_result typedOther = (grant_privileges_result)other; + revoke_privileges_result typedOther = (revoke_privileges_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { @@ -111409,7 +112323,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("grant_privileges_result("); + StringBuilder sb = new StringBuilder("revoke_privileges_result("); boolean first = true; sb.append("success:"); @@ -111450,15 +112364,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class grant_privileges_resultStandardSchemeFactory implements SchemeFactory { - public grant_privileges_resultStandardScheme getScheme() { - return new grant_privileges_resultStandardScheme(); + private static class revoke_privileges_resultStandardSchemeFactory implements SchemeFactory { + public revoke_privileges_resultStandardScheme getScheme() { + return new revoke_privileges_resultStandardScheme(); } } - private static class grant_privileges_resultStandardScheme extends StandardScheme { + private static class revoke_privileges_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, grant_privileges_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, revoke_privileges_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -111494,7 +112408,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, grant_privileges_re struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, grant_privileges_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, revoke_privileges_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -111514,16 +112428,16 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, grant_privileges_r } - private static class grant_privileges_resultTupleSchemeFactory implements SchemeFactory { - public grant_privileges_resultTupleScheme getScheme() { - return new grant_privileges_resultTupleScheme(); + private static class revoke_privileges_resultTupleSchemeFactory implements SchemeFactory { + public revoke_privileges_resultTupleScheme getScheme() { + return new revoke_privileges_resultTupleScheme(); } } - private static class grant_privileges_resultTupleScheme extends TupleScheme { + private static class revoke_privileges_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, grant_privileges_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, revoke_privileges_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { @@ -111542,7 +112456,7 @@ public void write(org.apache.thrift.protocol.TProtocol prot, grant_privileges_re } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, grant_privileges_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, revoke_privileges_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { @@ -111559,22 +112473,22 @@ public void read(org.apache.thrift.protocol.TProtocol prot, grant_privileges_res } - public static class revoke_privileges_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("revoke_privileges_args"); + public static class grant_revoke_privileges_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("grant_revoke_privileges_args"); - private static final org.apache.thrift.protocol.TField PRIVILEGES_FIELD_DESC = new org.apache.thrift.protocol.TField("privileges", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new revoke_privileges_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new revoke_privileges_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new grant_revoke_privileges_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new grant_revoke_privileges_argsTupleSchemeFactory()); } - private PrivilegeBag privileges; // required + private GrantRevokePrivilegeRequest request; // 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 { - PRIVILEGES((short)1, "privileges"); + REQUEST((short)1, "request"); private static final Map byName = new HashMap(); @@ -111589,8 +112503,8 @@ public void read(org.apache.thrift.protocol.TProtocol prot, grant_privileges_res */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // PRIVILEGES - return PRIVILEGES; + case 1: // REQUEST + return REQUEST; default: return null; } @@ -111634,70 +112548,70 @@ public String getFieldName() { 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.PRIVILEGES, new org.apache.thrift.meta_data.FieldMetaData("privileges", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PrivilegeBag.class))); + tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GrantRevokePrivilegeRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(revoke_privileges_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(grant_revoke_privileges_args.class, metaDataMap); } - public revoke_privileges_args() { + public grant_revoke_privileges_args() { } - public revoke_privileges_args( - PrivilegeBag privileges) + public grant_revoke_privileges_args( + GrantRevokePrivilegeRequest request) { this(); - this.privileges = privileges; + this.request = request; } /** * Performs a deep copy on other. */ - public revoke_privileges_args(revoke_privileges_args other) { - if (other.isSetPrivileges()) { - this.privileges = new PrivilegeBag(other.privileges); + public grant_revoke_privileges_args(grant_revoke_privileges_args other) { + if (other.isSetRequest()) { + this.request = new GrantRevokePrivilegeRequest(other.request); } } - public revoke_privileges_args deepCopy() { - return new revoke_privileges_args(this); + public grant_revoke_privileges_args deepCopy() { + return new grant_revoke_privileges_args(this); } @Override public void clear() { - this.privileges = null; + this.request = null; } - public PrivilegeBag getPrivileges() { - return this.privileges; + public GrantRevokePrivilegeRequest getRequest() { + return this.request; } - public void setPrivileges(PrivilegeBag privileges) { - this.privileges = privileges; + public void setRequest(GrantRevokePrivilegeRequest request) { + this.request = request; } - public void unsetPrivileges() { - this.privileges = null; + public void unsetRequest() { + this.request = null; } - /** Returns true if field privileges is set (has been assigned a value) and false otherwise */ - public boolean isSetPrivileges() { - return this.privileges != null; + /** Returns true if field request is set (has been assigned a value) and false otherwise */ + public boolean isSetRequest() { + return this.request != null; } - public void setPrivilegesIsSet(boolean value) { + public void setRequestIsSet(boolean value) { if (!value) { - this.privileges = null; + this.request = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case PRIVILEGES: + case REQUEST: if (value == null) { - unsetPrivileges(); + unsetRequest(); } else { - setPrivileges((PrivilegeBag)value); + setRequest((GrantRevokePrivilegeRequest)value); } break; @@ -111706,8 +112620,8 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case PRIVILEGES: - return getPrivileges(); + case REQUEST: + return getRequest(); } throw new IllegalStateException(); @@ -111720,8 +112634,8 @@ public boolean isSet(_Fields field) { } switch (field) { - case PRIVILEGES: - return isSetPrivileges(); + case REQUEST: + return isSetRequest(); } throw new IllegalStateException(); } @@ -111730,21 +112644,21 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof revoke_privileges_args) - return this.equals((revoke_privileges_args)that); + if (that instanceof grant_revoke_privileges_args) + return this.equals((grant_revoke_privileges_args)that); return false; } - public boolean equals(revoke_privileges_args that) { + public boolean equals(grant_revoke_privileges_args that) { if (that == null) return false; - boolean this_present_privileges = true && this.isSetPrivileges(); - boolean that_present_privileges = true && that.isSetPrivileges(); - if (this_present_privileges || that_present_privileges) { - if (!(this_present_privileges && that_present_privileges)) + boolean this_present_request = true && this.isSetRequest(); + boolean that_present_request = true && that.isSetRequest(); + if (this_present_request || that_present_request) { + if (!(this_present_request && that_present_request)) return false; - if (!this.privileges.equals(that.privileges)) + if (!this.request.equals(that.request)) return false; } @@ -111755,28 +112669,28 @@ public boolean equals(revoke_privileges_args that) { public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); - boolean present_privileges = true && (isSetPrivileges()); - builder.append(present_privileges); - if (present_privileges) - builder.append(privileges); + boolean present_request = true && (isSetRequest()); + builder.append(present_request); + if (present_request) + builder.append(request); return builder.toHashCode(); } - public int compareTo(revoke_privileges_args other) { + public int compareTo(grant_revoke_privileges_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - revoke_privileges_args typedOther = (revoke_privileges_args)other; + grant_revoke_privileges_args typedOther = (grant_revoke_privileges_args)other; - lastComparison = Boolean.valueOf(isSetPrivileges()).compareTo(typedOther.isSetPrivileges()); + lastComparison = Boolean.valueOf(isSetRequest()).compareTo(typedOther.isSetRequest()); if (lastComparison != 0) { return lastComparison; } - if (isSetPrivileges()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.privileges, typedOther.privileges); + if (isSetRequest()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, typedOther.request); if (lastComparison != 0) { return lastComparison; } @@ -111798,14 +112712,14 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("revoke_privileges_args("); + StringBuilder sb = new StringBuilder("grant_revoke_privileges_args("); boolean first = true; - sb.append("privileges:"); - if (this.privileges == null) { + sb.append("request:"); + if (this.request == null) { sb.append("null"); } else { - sb.append(this.privileges); + sb.append(this.request); } first = false; sb.append(")"); @@ -111815,8 +112729,8 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity - if (privileges != null) { - privileges.validate(); + if (request != null) { + request.validate(); } } @@ -111836,15 +112750,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class revoke_privileges_argsStandardSchemeFactory implements SchemeFactory { - public revoke_privileges_argsStandardScheme getScheme() { - return new revoke_privileges_argsStandardScheme(); + private static class grant_revoke_privileges_argsStandardSchemeFactory implements SchemeFactory { + public grant_revoke_privileges_argsStandardScheme getScheme() { + return new grant_revoke_privileges_argsStandardScheme(); } } - private static class revoke_privileges_argsStandardScheme extends StandardScheme { + private static class grant_revoke_privileges_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, revoke_privileges_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, grant_revoke_privileges_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -111854,11 +112768,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, revoke_privileges_a break; } switch (schemeField.id) { - case 1: // PRIVILEGES + case 1: // REQUEST if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.privileges = new PrivilegeBag(); - struct.privileges.read(iprot); - struct.setPrivilegesIsSet(true); + struct.request = new GrantRevokePrivilegeRequest(); + struct.request.read(iprot); + struct.setRequestIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -111872,13 +112786,13 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, revoke_privileges_a struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, revoke_privileges_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, grant_revoke_privileges_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.privileges != null) { - oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); - struct.privileges.write(oprot); + if (struct.request != null) { + oprot.writeFieldBegin(REQUEST_FIELD_DESC); + struct.request.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -111887,54 +112801,54 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, revoke_privileges_ } - private static class revoke_privileges_argsTupleSchemeFactory implements SchemeFactory { - public revoke_privileges_argsTupleScheme getScheme() { - return new revoke_privileges_argsTupleScheme(); + private static class grant_revoke_privileges_argsTupleSchemeFactory implements SchemeFactory { + public grant_revoke_privileges_argsTupleScheme getScheme() { + return new grant_revoke_privileges_argsTupleScheme(); } } - private static class revoke_privileges_argsTupleScheme extends TupleScheme { + private static class grant_revoke_privileges_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, revoke_privileges_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, grant_revoke_privileges_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetPrivileges()) { + if (struct.isSetRequest()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); - if (struct.isSetPrivileges()) { - struct.privileges.write(oprot); + if (struct.isSetRequest()) { + struct.request.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, revoke_privileges_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, grant_revoke_privileges_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.privileges = new PrivilegeBag(); - struct.privileges.read(iprot); - struct.setPrivilegesIsSet(true); + struct.request = new GrantRevokePrivilegeRequest(); + struct.request.read(iprot); + struct.setRequestIsSet(true); } } } } - public static class revoke_privileges_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("revoke_privileges_result"); + public static class grant_revoke_privileges_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("grant_revoke_privileges_result"); - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new revoke_privileges_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new revoke_privileges_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new grant_revoke_privileges_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new grant_revoke_privileges_resultTupleSchemeFactory()); } - private boolean success; // required + private GrantRevokePrivilegeResponse success; // required private MetaException o1; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -111999,74 +112913,72 @@ public String getFieldName() { } // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - private byte __isset_bitfield = 0; 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GrantRevokePrivilegeResponse.class))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(revoke_privileges_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(grant_revoke_privileges_result.class, metaDataMap); } - public revoke_privileges_result() { + public grant_revoke_privileges_result() { } - public revoke_privileges_result( - boolean success, + public grant_revoke_privileges_result( + GrantRevokePrivilegeResponse success, MetaException o1) { this(); this.success = success; - setSuccessIsSet(true); this.o1 = o1; } /** * Performs a deep copy on other. */ - public revoke_privileges_result(revoke_privileges_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; + public grant_revoke_privileges_result(grant_revoke_privileges_result other) { + if (other.isSetSuccess()) { + this.success = new GrantRevokePrivilegeResponse(other.success); + } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } } - public revoke_privileges_result deepCopy() { - return new revoke_privileges_result(this); + public grant_revoke_privileges_result deepCopy() { + return new grant_revoke_privileges_result(this); } @Override public void clear() { - setSuccessIsSet(false); - this.success = false; + this.success = null; this.o1 = null; } - public boolean isSuccess() { + public GrantRevokePrivilegeResponse getSuccess() { return this.success; } - public void setSuccess(boolean success) { + public void setSuccess(GrantRevokePrivilegeResponse success) { this.success = success; - setSuccessIsSet(true); } public void unsetSuccess() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); + this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + return this.success != null; } public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + if (!value) { + this.success = null; + } } public MetaException getO1() { @@ -112098,7 +113010,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetSuccess(); } else { - setSuccess((Boolean)value); + setSuccess((GrantRevokePrivilegeResponse)value); } break; @@ -112116,7 +113028,7 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: - return Boolean.valueOf(isSuccess()); + return getSuccess(); case O1: return getO1(); @@ -112144,21 +113056,21 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof revoke_privileges_result) - return this.equals((revoke_privileges_result)that); + if (that instanceof grant_revoke_privileges_result) + return this.equals((grant_revoke_privileges_result)that); return false; } - public boolean equals(revoke_privileges_result that) { + public boolean equals(grant_revoke_privileges_result that) { if (that == null) return false; - boolean this_present_success = true; - boolean that_present_success = true; + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; - if (this.success != that.success) + if (!this.success.equals(that.success)) return false; } @@ -112178,7 +113090,7 @@ public boolean equals(revoke_privileges_result that) { public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); - boolean present_success = true; + boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); @@ -112191,13 +113103,13 @@ public int hashCode() { return builder.toHashCode(); } - public int compareTo(revoke_privileges_result other) { + public int compareTo(grant_revoke_privileges_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - revoke_privileges_result typedOther = (revoke_privileges_result)other; + grant_revoke_privileges_result typedOther = (grant_revoke_privileges_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { @@ -112236,11 +113148,15 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("revoke_privileges_result("); + StringBuilder sb = new StringBuilder("grant_revoke_privileges_result("); boolean first = true; sb.append("success:"); - sb.append(this.success); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } first = false; if (!first) sb.append(", "); sb.append("o1:"); @@ -112257,6 +113173,9 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity + if (success != null) { + success.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -112269,23 +113188,21 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; 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 revoke_privileges_resultStandardSchemeFactory implements SchemeFactory { - public revoke_privileges_resultStandardScheme getScheme() { - return new revoke_privileges_resultStandardScheme(); + private static class grant_revoke_privileges_resultStandardSchemeFactory implements SchemeFactory { + public grant_revoke_privileges_resultStandardScheme getScheme() { + return new grant_revoke_privileges_resultStandardScheme(); } } - private static class revoke_privileges_resultStandardScheme extends StandardScheme { + private static class grant_revoke_privileges_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, revoke_privileges_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, grant_revoke_privileges_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -112296,8 +113213,9 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, revoke_privileges_r } switch (schemeField.id) { case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.success = iprot.readBool(); + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new GrantRevokePrivilegeResponse(); + struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); @@ -112321,13 +113239,13 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, revoke_privileges_r struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, revoke_privileges_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, grant_revoke_privileges_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.isSetSuccess()) { + if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(struct.success); + struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.o1 != null) { @@ -112341,16 +113259,16 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, revoke_privileges_ } - private static class revoke_privileges_resultTupleSchemeFactory implements SchemeFactory { - public revoke_privileges_resultTupleScheme getScheme() { - return new revoke_privileges_resultTupleScheme(); + private static class grant_revoke_privileges_resultTupleSchemeFactory implements SchemeFactory { + public grant_revoke_privileges_resultTupleScheme getScheme() { + return new grant_revoke_privileges_resultTupleScheme(); } } - private static class revoke_privileges_resultTupleScheme extends TupleScheme { + private static class grant_revoke_privileges_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, revoke_privileges_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, grant_revoke_privileges_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { @@ -112361,7 +113279,7 @@ public void write(org.apache.thrift.protocol.TProtocol prot, revoke_privileges_r } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { - oprot.writeBool(struct.success); + struct.success.write(oprot); } if (struct.isSetO1()) { struct.o1.write(oprot); @@ -112369,11 +113287,12 @@ public void write(org.apache.thrift.protocol.TProtocol prot, revoke_privileges_r } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, revoke_privileges_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, grant_revoke_privileges_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.success = iprot.readBool(); + struct.success = new GrantRevokePrivilegeResponse(); + struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { diff --git metastore/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php metastore/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php index 82288b5..b74e54e 100644 --- metastore/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php +++ metastore/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php @@ -107,6 +107,7 @@ interface ThriftHiveMetastoreIf extends \FacebookServiceIf { public function list_privileges($principal_name, $principal_type, \metastore\HiveObjectRef $hiveObject); public function grant_privileges(\metastore\PrivilegeBag $privileges); public function revoke_privileges(\metastore\PrivilegeBag $privileges); + public function grant_revoke_privileges(\metastore\GrantRevokePrivilegeRequest $request); public function set_ugi($user_name, $group_names); public function get_delegation_token($token_owner, $renewer_kerberos_principal_name); public function renew_delegation_token($token_str_form); @@ -5459,6 +5460,60 @@ class ThriftHiveMetastoreClient extends \FacebookServiceClient implements \metas throw new \Exception("revoke_privileges failed: unknown result"); } + public function grant_revoke_privileges(\metastore\GrantRevokePrivilegeRequest $request) + { + $this->send_grant_revoke_privileges($request); + return $this->recv_grant_revoke_privileges(); + } + + public function send_grant_revoke_privileges(\metastore\GrantRevokePrivilegeRequest $request) + { + $args = new \metastore\ThriftHiveMetastore_grant_revoke_privileges_args(); + $args->request = $request; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'grant_revoke_privileges', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('grant_revoke_privileges', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_grant_revoke_privileges() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_grant_revoke_privileges_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_grant_revoke_privileges_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new \Exception("grant_revoke_privileges failed: unknown result"); + } + public function set_ugi($user_name, $group_names) { $this->send_set_ugi($user_name, $group_names); @@ -27917,6 +27972,182 @@ class ThriftHiveMetastore_revoke_privileges_result { } +class ThriftHiveMetastore_grant_revoke_privileges_args { + static $_TSPEC; + + public $request = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'request', + 'type' => TType::STRUCT, + 'class' => '\metastore\GrantRevokePrivilegeRequest', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['request'])) { + $this->request = $vals['request']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_grant_revoke_privileges_args'; + } + + 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->request = new \metastore\GrantRevokePrivilegeRequest(); + $xfer += $this->request->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('ThriftHiveMetastore_grant_revoke_privileges_args'); + if ($this->request !== null) { + if (!is_object($this->request)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('request', TType::STRUCT, 1); + $xfer += $this->request->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_grant_revoke_privileges_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\GrantRevokePrivilegeResponse', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_grant_revoke_privileges_result'; + } + + 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 0: + if ($ftype == TType::STRUCT) { + $this->success = new \metastore\GrantRevokePrivilegeResponse(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->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('ThriftHiveMetastore_grant_revoke_privileges_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + class ThriftHiveMetastore_set_ugi_args { static $_TSPEC; diff --git metastore/src/gen/thrift/gen-php/metastore/Types.php metastore/src/gen/thrift/gen-php/metastore/Types.php index 32d2cb7..4d4ab84 100644 --- metastore/src/gen/thrift/gen-php/metastore/Types.php +++ metastore/src/gen/thrift/gen-php/metastore/Types.php @@ -1356,6 +1356,195 @@ class PrincipalPrivilegeSet { } +class GrantRevokePrivilegeRequest { + static $_TSPEC; + + public $requestType = null; + public $privileges = null; + public $revokeGrantOption = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'requestType', + 'type' => TType::I32, + ), + 2 => array( + 'var' => 'privileges', + 'type' => TType::STRUCT, + 'class' => '\metastore\PrivilegeBag', + ), + 3 => array( + 'var' => 'revokeGrantOption', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['requestType'])) { + $this->requestType = $vals['requestType']; + } + if (isset($vals['privileges'])) { + $this->privileges = $vals['privileges']; + } + if (isset($vals['revokeGrantOption'])) { + $this->revokeGrantOption = $vals['revokeGrantOption']; + } + } + } + + public function getName() { + return 'GrantRevokePrivilegeRequest'; + } + + 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->requestType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->privileges = new \metastore\PrivilegeBag(); + $xfer += $this->privileges->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->revokeGrantOption); + } 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('GrantRevokePrivilegeRequest'); + if ($this->requestType !== null) { + $xfer += $output->writeFieldBegin('requestType', TType::I32, 1); + $xfer += $output->writeI32($this->requestType); + $xfer += $output->writeFieldEnd(); + } + if ($this->privileges !== null) { + if (!is_object($this->privileges)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('privileges', TType::STRUCT, 2); + $xfer += $this->privileges->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->revokeGrantOption !== null) { + $xfer += $output->writeFieldBegin('revokeGrantOption', TType::BOOL, 3); + $xfer += $output->writeBool($this->revokeGrantOption); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class GrantRevokePrivilegeResponse { + static $_TSPEC; + + public $success = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + } + } + + public function getName() { + return 'GrantRevokePrivilegeResponse'; + } + + 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::BOOL) { + $xfer += $input->readBool($this->success); + } 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('GrantRevokePrivilegeResponse'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 1); + $xfer += $output->writeBool($this->success); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + class Role { static $_TSPEC; diff --git metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote old mode 100644 new mode 100755 index c4eb7a9..6fef2cf --- metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote +++ metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote @@ -114,6 +114,7 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help': print ' list_privileges(string principal_name, PrincipalType principal_type, HiveObjectRef hiveObject)' print ' bool grant_privileges(PrivilegeBag privileges)' print ' bool revoke_privileges(PrivilegeBag privileges)' + print ' GrantRevokePrivilegeResponse grant_revoke_privileges(GrantRevokePrivilegeRequest request)' print ' set_ugi(string user_name, group_names)' print ' string get_delegation_token(string token_owner, string renewer_kerberos_principal_name)' print ' i64 renew_delegation_token(string token_str_form)' @@ -728,6 +729,12 @@ elif cmd == 'revoke_privileges': sys.exit(1) pp.pprint(client.revoke_privileges(eval(args[0]),)) +elif cmd == 'grant_revoke_privileges': + if len(args) != 1: + print 'grant_revoke_privileges requires 1 args' + sys.exit(1) + pp.pprint(client.grant_revoke_privileges(eval(args[0]),)) + elif cmd == 'set_ugi': if len(args) != 2: print 'set_ugi requires 2 args' diff --git metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py index 22eb538..2a2e443 100644 --- metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py +++ metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py @@ -791,6 +791,13 @@ def revoke_privileges(self, privileges): """ pass + def grant_revoke_privileges(self, request): + """ + Parameters: + - request + """ + pass + def set_ugi(self, user_name, group_names): """ Parameters: @@ -4278,6 +4285,38 @@ def recv_revoke_privileges(self, ): raise result.o1 raise TApplicationException(TApplicationException.MISSING_RESULT, "revoke_privileges failed: unknown result"); + def grant_revoke_privileges(self, request): + """ + Parameters: + - request + """ + self.send_grant_revoke_privileges(request) + return self.recv_grant_revoke_privileges() + + def send_grant_revoke_privileges(self, request): + self._oprot.writeMessageBegin('grant_revoke_privileges', TMessageType.CALL, self._seqid) + args = grant_revoke_privileges_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_grant_revoke_privileges(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = grant_revoke_privileges_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "grant_revoke_privileges failed: unknown result"); + def set_ugi(self, user_name, group_names): """ Parameters: @@ -4899,6 +4938,7 @@ def __init__(self, handler): self._processMap["list_privileges"] = Processor.process_list_privileges self._processMap["grant_privileges"] = Processor.process_grant_privileges self._processMap["revoke_privileges"] = Processor.process_revoke_privileges + self._processMap["grant_revoke_privileges"] = Processor.process_grant_revoke_privileges self._processMap["set_ugi"] = Processor.process_set_ugi self._processMap["get_delegation_token"] = Processor.process_get_delegation_token self._processMap["renew_delegation_token"] = Processor.process_renew_delegation_token @@ -6426,6 +6466,20 @@ def process_revoke_privileges(self, seqid, iprot, oprot): oprot.writeMessageEnd() oprot.trans.flush() + def process_grant_revoke_privileges(self, seqid, iprot, oprot): + args = grant_revoke_privileges_args() + args.read(iprot) + iprot.readMessageEnd() + result = grant_revoke_privileges_result() + try: + result.success = self._handler.grant_revoke_privileges(args.request) + except MetaException as o1: + result.o1 = o1 + oprot.writeMessageBegin("grant_revoke_privileges", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + def process_set_ugi(self, seqid, iprot, oprot): args = set_ugi_args() args.read(iprot) @@ -22017,6 +22071,140 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) +class grant_revoke_privileges_args: + """ + Attributes: + - request + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'request', (GrantRevokePrivilegeRequest, GrantRevokePrivilegeRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, request=None,): + self.request = request + + 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.request = GrantRevokePrivilegeRequest() + self.request.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('grant_revoke_privileges_args') + if self.request is not None: + oprot.writeFieldBegin('request', TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + 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 grant_revoke_privileges_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (GrantRevokePrivilegeResponse, GrantRevokePrivilegeResponse.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + 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 == 0: + if ftype == TType.STRUCT: + self.success = GrantRevokePrivilegeResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.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('grant_revoke_privileges_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + 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 set_ugi_args: """ Attributes: diff --git metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py index 53d9604..c71b7b7 100644 --- metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py +++ metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py @@ -990,6 +990,151 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) +class GrantRevokePrivilegeRequest: + """ + Attributes: + - requestType + - privileges + - revokeGrantOption + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'requestType', None, None, ), # 1 + (2, TType.STRUCT, 'privileges', (PrivilegeBag, PrivilegeBag.thrift_spec), None, ), # 2 + (3, TType.BOOL, 'revokeGrantOption', None, None, ), # 3 + ) + + def __init__(self, requestType=None, privileges=None, revokeGrantOption=None,): + self.requestType = requestType + self.privileges = privileges + self.revokeGrantOption = revokeGrantOption + + 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.I32: + self.requestType = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.privileges = PrivilegeBag() + self.privileges.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.BOOL: + self.revokeGrantOption = iprot.readBool(); + 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('GrantRevokePrivilegeRequest') + if self.requestType is not None: + oprot.writeFieldBegin('requestType', TType.I32, 1) + oprot.writeI32(self.requestType) + oprot.writeFieldEnd() + if self.privileges is not None: + oprot.writeFieldBegin('privileges', TType.STRUCT, 2) + self.privileges.write(oprot) + oprot.writeFieldEnd() + if self.revokeGrantOption is not None: + oprot.writeFieldBegin('revokeGrantOption', TType.BOOL, 3) + oprot.writeBool(self.revokeGrantOption) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + 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 GrantRevokePrivilegeResponse: + """ + Attributes: + - success + """ + + thrift_spec = ( + None, # 0 + (1, TType.BOOL, 'success', None, None, ), # 1 + ) + + def __init__(self, success=None,): + self.success = success + + 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.BOOL: + self.success = iprot.readBool(); + 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('GrantRevokePrivilegeResponse') + if self.success is not None: + oprot.writeFieldBegin('success', TType.BOOL, 1) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + 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 Role: """ Attributes: diff --git metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb index 34619ff..e21f662 100644 --- metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb +++ metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb @@ -268,6 +268,45 @@ class PrincipalPrivilegeSet ::Thrift::Struct.generate_accessors self end +class GrantRevokePrivilegeRequest + include ::Thrift::Struct, ::Thrift::Struct_Union + REQUESTTYPE = 1 + PRIVILEGES = 2 + REVOKEGRANTOPTION = 3 + + FIELDS = { + REQUESTTYPE => {:type => ::Thrift::Types::I32, :name => 'requestType', :enum_class => ::GrantRevokeType}, + PRIVILEGES => {:type => ::Thrift::Types::STRUCT, :name => 'privileges', :class => ::PrivilegeBag}, + REVOKEGRANTOPTION => {:type => ::Thrift::Types::BOOL, :name => 'revokeGrantOption', :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + unless @requestType.nil? || ::GrantRevokeType::VALID_VALUES.include?(@requestType) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field requestType!') + end + end + + ::Thrift::Struct.generate_accessors self +end + +class GrantRevokePrivilegeResponse + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success', :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + class Role include ::Thrift::Struct, ::Thrift::Struct_Union ROLENAME = 1 diff --git metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb index e3a5bfa..58b9c0e 100644 --- metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb +++ metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb @@ -1560,6 +1560,22 @@ module ThriftHiveMetastore raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'revoke_privileges failed: unknown result') end + def grant_revoke_privileges(request) + send_grant_revoke_privileges(request) + return recv_grant_revoke_privileges() + end + + def send_grant_revoke_privileges(request) + send_message('grant_revoke_privileges', Grant_revoke_privileges_args, :request => request) + end + + def recv_grant_revoke_privileges() + result = receive_message(Grant_revoke_privileges_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'grant_revoke_privileges failed: unknown result') + end + def set_ugi(user_name, group_names) send_set_ugi(user_name, group_names) return recv_set_ugi() @@ -3052,6 +3068,17 @@ module ThriftHiveMetastore write_result(result, oprot, 'revoke_privileges', seqid) end + def process_grant_revoke_privileges(seqid, iprot, oprot) + args = read_args(iprot, Grant_revoke_privileges_args) + result = Grant_revoke_privileges_result.new() + begin + result.success = @handler.grant_revoke_privileges(args.request) + rescue ::MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'grant_revoke_privileges', seqid) + end + def process_set_ugi(seqid, iprot, oprot) args = read_args(iprot, Set_ugi_args) result = Set_ugi_result.new() @@ -6806,6 +6833,40 @@ module ThriftHiveMetastore ::Thrift::Struct.generate_accessors self end + class Grant_revoke_privileges_args + include ::Thrift::Struct, ::Thrift::Struct_Union + REQUEST = 1 + + FIELDS = { + REQUEST => {:type => ::Thrift::Types::STRUCT, :name => 'request', :class => ::GrantRevokePrivilegeRequest} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Grant_revoke_privileges_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::GrantRevokePrivilegeResponse}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + class Set_ugi_args include ::Thrift::Struct, ::Thrift::Struct_Union USER_NAME = 1 diff --git metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java index bace609..fa7ff20 100644 --- metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java +++ metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java @@ -85,6 +85,8 @@ import org.apache.hadoop.hive.metastore.api.GetPrincipalsInRoleResponse; import org.apache.hadoop.hive.metastore.api.GetRoleGrantsForPrincipalRequest; import org.apache.hadoop.hive.metastore.api.GetRoleGrantsForPrincipalResponse; +import org.apache.hadoop.hive.metastore.api.GrantRevokePrivilegeRequest; +import org.apache.hadoop.hive.metastore.api.GrantRevokePrivilegeResponse; import org.apache.hadoop.hive.metastore.api.GrantRevokeRoleRequest; import org.apache.hadoop.hive.metastore.api.GrantRevokeRoleResponse; import org.apache.hadoop.hive.metastore.api.GrantRevokeType; @@ -4128,13 +4130,44 @@ public GrantRevokeRoleResponse grant_revoke_role(GrantRevokeRoleRequest request) } @Override + public GrantRevokePrivilegeResponse grant_revoke_privileges(GrantRevokePrivilegeRequest request) + throws MetaException, org.apache.thrift.TException { + GrantRevokePrivilegeResponse response = new GrantRevokePrivilegeResponse(); + switch (request.getRequestType()) { + case GRANT: { + boolean result = grant_privileges(request.getPrivileges()); + response.setSuccess(result); + break; + } + case REVOKE: { + boolean revokeGrantOption = false; + if (request.isSetRevokeGrantOption()) { + revokeGrantOption = request.isRevokeGrantOption(); + } + boolean result = revoke_privileges(request.getPrivileges(), revokeGrantOption); + response.setSuccess(result); + break; + } + default: + throw new MetaException("Unknown request type " + request.getRequestType()); + } + + return response; + } + + @Override public boolean revoke_privileges(final PrivilegeBag privileges) throws MetaException, TException { + return revoke_privileges(privileges, false); + } + + public boolean revoke_privileges(final PrivilegeBag privileges, boolean grantOption) + throws MetaException, TException { incrementCounter("revoke_privileges"); firePreEvent(new PreAuthorizationCallEvent(this)); Boolean ret = null; try { - ret = getMS().revokePrivileges(privileges); + ret = getMS().revokePrivileges(privileges, grantOption); } catch (MetaException e) { throw e; } catch (Exception e) { diff --git metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java index 32da869..4f3f771 100644 --- metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java +++ metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java @@ -73,6 +73,8 @@ import org.apache.hadoop.hive.metastore.api.GetPrincipalsInRoleResponse; import org.apache.hadoop.hive.metastore.api.GetRoleGrantsForPrincipalRequest; import org.apache.hadoop.hive.metastore.api.GetRoleGrantsForPrincipalResponse; +import org.apache.hadoop.hive.metastore.api.GrantRevokePrivilegeRequest; +import org.apache.hadoop.hive.metastore.api.GrantRevokePrivilegeResponse; import org.apache.hadoop.hive.metastore.api.GrantRevokeRoleRequest; import org.apache.hadoop.hive.metastore.api.GrantRevokeRoleResponse; import org.apache.hadoop.hive.metastore.api.GrantRevokeType; @@ -1498,7 +1500,14 @@ public GetRoleGrantsForPrincipalResponse get_role_grants_for_principal( @Override public boolean grant_privileges(PrivilegeBag privileges) throws MetaException, TException { - return client.grant_privileges(privileges); + GrantRevokePrivilegeRequest req = new GrantRevokePrivilegeRequest(); + req.setRequestType(GrantRevokeType.GRANT); + req.setPrivileges(privileges); + GrantRevokePrivilegeResponse res = client.grant_revoke_privileges(req); + if (!res.isSetSuccess()) { + throw new MetaException("GrantRevokePrivilegeResponse missing success field"); + } + return res.isSuccess(); } @Override @@ -1518,9 +1527,17 @@ public boolean revoke_role(String roleName, String userName, } @Override - public boolean revoke_privileges(PrivilegeBag privileges) throws MetaException, + public boolean revoke_privileges(PrivilegeBag privileges, boolean grantOption) throws MetaException, TException { - return client.revoke_privileges(privileges); + GrantRevokePrivilegeRequest req = new GrantRevokePrivilegeRequest(); + req.setRequestType(GrantRevokeType.REVOKE); + req.setPrivileges(privileges); + req.setRevokeGrantOption(grantOption); + GrantRevokePrivilegeResponse res = client.grant_revoke_privileges(req); + if (!res.isSetSuccess()) { + throw new MetaException("GrantRevokePrivilegeResponse missing success field"); + } + return res.isSuccess(); } @Override diff --git metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java index 9ce717a..5add436 100644 --- metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java +++ metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java @@ -52,6 +52,8 @@ import org.apache.hadoop.hive.metastore.api.GetPrincipalsInRoleResponse; import org.apache.hadoop.hive.metastore.api.GetRoleGrantsForPrincipalRequest; import org.apache.hadoop.hive.metastore.api.GetRoleGrantsForPrincipalResponse; +import org.apache.hadoop.hive.metastore.api.GrantRevokePrivilegeRequest; +import org.apache.hadoop.hive.metastore.api.GrantRevokePrivilegeResponse; import org.apache.hadoop.hive.metastore.api.HiveObjectPrivilege; import org.apache.hadoop.hive.metastore.api.HiveObjectRef; import org.apache.hadoop.hive.metastore.api.Index; @@ -1010,7 +1012,7 @@ public boolean grant_privileges(PrivilegeBag privileges) * @throws MetaException * @throws TException */ - public boolean revoke_privileges(PrivilegeBag privileges) + public boolean revoke_privileges(PrivilegeBag privileges, boolean grantOption) throws MetaException, TException; /** diff --git metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java index 5e2cad7..4f186f4 100644 --- metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java +++ metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java @@ -3916,7 +3916,7 @@ public boolean grantPrivileges(PrivilegeBag privileges) throws InvalidObjectExce } @Override - public boolean revokePrivileges(PrivilegeBag privileges) + public boolean revokePrivileges(PrivilegeBag privileges, boolean grantOption) throws InvalidObjectException, MetaException, NoSuchObjectException { boolean committed = false; try { @@ -3950,6 +3950,14 @@ public boolean revokePrivileges(PrivilegeBag privileges) String userGrantPrivs = userGrant.getPrivilege(); if (privilege.equals(userGrantPrivs)) { found = true; + if (grantOption) { + if (userGrant.getGrantOption()) { + userGrant.setGrantOption(false); + } else { + throw new MetaException("User " + userName + + " does not have grant option with privilege " + privilege); + } + } persistentObjs.add(userGrant); break; } @@ -3973,6 +3981,14 @@ public boolean revokePrivileges(PrivilegeBag privileges) String dbGrantPriv = dbGrant.getPrivilege(); if (privilege.equals(dbGrantPriv)) { found = true; + if (grantOption) { + if (dbGrant.getGrantOption()) { + dbGrant.setGrantOption(false); + } else { + throw new MetaException("User " + userName + + " does not have grant option with privilege " + privilege); + } + } persistentObjs.add(dbGrant); break; } @@ -3994,6 +4010,14 @@ public boolean revokePrivileges(PrivilegeBag privileges) String tableGrantPriv = tabGrant.getPrivilege(); if (privilege.equalsIgnoreCase(tableGrantPriv)) { found = true; + if (grantOption) { + if (tabGrant.getGrantOption()) { + tabGrant.setGrantOption(false); + } else { + throw new MetaException("User " + userName + + " does not have grant option with privilege " + privilege); + } + } persistentObjs.add(tabGrant); break; } @@ -4020,6 +4044,14 @@ public boolean revokePrivileges(PrivilegeBag privileges) String partPriv = partGrant.getPrivilege(); if (partPriv.equalsIgnoreCase(privilege)) { found = true; + if (grantOption) { + if (partGrant.getGrantOption()) { + partGrant.setGrantOption(false); + } else { + throw new MetaException("User " + userName + + " does not have grant option with privilege " + privilege); + } + } persistentObjs.add(partGrant); break; } @@ -4051,6 +4083,14 @@ public boolean revokePrivileges(PrivilegeBag privileges) String colPriv = col.getPrivilege(); if (colPriv.equalsIgnoreCase(privilege)) { found = true; + if (grantOption) { + if (col.getGrantOption()) { + col.setGrantOption(false); + } else { + throw new MetaException("User " + userName + + " does not have grant option with privilege " + privilege); + } + } persistentObjs.add(col); break; } @@ -4075,6 +4115,14 @@ public boolean revokePrivileges(PrivilegeBag privileges) String colPriv = col.getPrivilege(); if (colPriv.equalsIgnoreCase(privilege)) { found = true; + if (grantOption) { + if (col.getGrantOption()) { + col.setGrantOption(false); + } else { + throw new MetaException("User " + userName + + " does not have grant option with privilege " + privilege); + } + } persistentObjs.add(col); break; } @@ -4095,7 +4143,12 @@ public boolean revokePrivileges(PrivilegeBag privileges) } if (persistentObjs.size() > 0) { - pm.deletePersistentAll(persistentObjs); + if (grantOption) { + // If grant option specified, only update the privilege, don't remove it. + // Grant option has already been removed from the privileges in the section above + } else { + pm.deletePersistentAll(persistentObjs); + } } committed = commitTransaction(); } finally { diff --git metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java index c9c3037..2379ce7 100644 --- metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java +++ metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java @@ -273,7 +273,7 @@ public abstract PrincipalPrivilegeSet getColumnPrivilegeSet (String dbName, Stri public abstract boolean grantPrivileges (PrivilegeBag privileges) throws InvalidObjectException, MetaException, NoSuchObjectException; - public abstract boolean revokePrivileges (PrivilegeBag privileges) + public abstract boolean revokePrivileges (PrivilegeBag privileges, boolean grantOption) throws InvalidObjectException, MetaException, NoSuchObjectException; public abstract org.apache.hadoop.hive.metastore.api.Role getRole( diff --git metastore/src/test/org/apache/hadoop/hive/metastore/DummyRawStoreControlledCommit.java metastore/src/test/org/apache/hadoop/hive/metastore/DummyRawStoreControlledCommit.java index 5f9ab4d..396eb4e 100644 --- metastore/src/test/org/apache/hadoop/hive/metastore/DummyRawStoreControlledCommit.java +++ metastore/src/test/org/apache/hadoop/hive/metastore/DummyRawStoreControlledCommit.java @@ -437,9 +437,9 @@ public boolean grantPrivileges(PrivilegeBag privileges) throws InvalidObjectExce } @Override - public boolean revokePrivileges(PrivilegeBag privileges) throws InvalidObjectException, - MetaException, NoSuchObjectException { - return objectStore.revokePrivileges(privileges); + public boolean revokePrivileges(PrivilegeBag privileges, boolean grantOption) + throws InvalidObjectException, MetaException, NoSuchObjectException { + return objectStore.revokePrivileges(privileges, grantOption); } @Override diff --git metastore/src/test/org/apache/hadoop/hive/metastore/DummyRawStoreForJdoConnection.java metastore/src/test/org/apache/hadoop/hive/metastore/DummyRawStoreForJdoConnection.java index b7997c0..80c3b2b 100644 --- metastore/src/test/org/apache/hadoop/hive/metastore/DummyRawStoreForJdoConnection.java +++ metastore/src/test/org/apache/hadoop/hive/metastore/DummyRawStoreForJdoConnection.java @@ -462,8 +462,8 @@ public boolean grantPrivileges(PrivilegeBag privileges) throws InvalidObjectExce } @Override - public boolean revokePrivileges(PrivilegeBag privileges) throws InvalidObjectException, - MetaException, NoSuchObjectException { + public boolean revokePrivileges(PrivilegeBag privileges, boolean grantOption) + throws InvalidObjectException, MetaException, NoSuchObjectException { return false; } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java index ee074ea..0ffd16c 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java @@ -452,7 +452,8 @@ public int execute(DriverContext driverContext) { RevokeDesc revokeDesc = work.getRevokeDesc(); if (revokeDesc != null) { return grantOrRevokePrivileges(revokeDesc.getPrincipals(), revokeDesc - .getPrivileges(), revokeDesc.getPrivilegeSubjectDesc(), null, null, false, false); + .getPrivileges(), revokeDesc.getPrivilegeSubjectDesc(), null, null, + revokeDesc.isGrantOption(), false); } ShowGrantDesc showGrantDesc = work.getShowGrantDesc(); @@ -882,8 +883,9 @@ private int grantOrRevokePrivileges(List principals, if (isGrant) { db.grantPrivileges(privBag); } else { - db.revokePrivileges(privBag); + db.revokePrivileges(privBag, grantOption); } + } } catch (Exception e) { console.printError("Error: " + e.getMessage()); diff --git ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java index a891838..81323f6 100644 --- ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java +++ ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java @@ -1136,10 +1136,10 @@ public boolean grantPrivileges(PrivilegeBag privileges) * @return true on success * @throws HiveException */ - public boolean revokePrivileges(PrivilegeBag privileges) + public boolean revokePrivileges(PrivilegeBag privileges, boolean grantOption) throws HiveException { try { - return getMSC().revoke_privileges(privileges); + return getMSC().revoke_privileges(privileges, grantOption); } catch (Exception e) { throw new HiveException(e); } diff --git ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g index f5d0602..2f99cb1 100644 --- ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g +++ ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g @@ -264,6 +264,7 @@ TOK_RESOURCE_ALL; TOK_GRANT_WITH_OPTION; TOK_GRANT_WITH_ADMIN_OPTION; TOK_ADMIN_OPTION_FOR; +TOK_GRANT_OPTION_FOR; TOK_PRIV_ALL; TOK_PRIV_ALTER_METADATA; TOK_PRIV_ALTER_DATA; @@ -1388,8 +1389,8 @@ grantPrivileges revokePrivileges @init {pushMsg("revoke privileges", state);} @afer {popMsg(state);} - : KW_REVOKE privilegeList privilegeObject? KW_FROM principalSpecification - -> ^(TOK_REVOKE privilegeList principalSpecification privilegeObject?) + : KW_REVOKE grantOptionFor? privilegeList privilegeObject? KW_FROM principalSpecification + -> ^(TOK_REVOKE privilegeList principalSpecification privilegeObject? grantOptionFor?) ; grantRole @@ -1526,6 +1527,13 @@ withGrantOption -> ^(TOK_GRANT_WITH_OPTION) ; +grantOptionFor +@init {pushMsg("grant option for", state);} +@after {popMsg(state);} + : KW_GRANT KW_OPTION KW_FOR + -> ^(TOK_GRANT_OPTION_FOR) +; + adminOptionFor @init {pushMsg("admin option for", state);} @after {popMsg(state);} diff --git ql/src/java/org/apache/hadoop/hive/ql/parse/authorization/HiveAuthorizationTaskFactoryImpl.java ql/src/java/org/apache/hadoop/hive/ql/parse/authorization/HiveAuthorizationTaskFactoryImpl.java index c32d81e..826bdf3 100644 --- ql/src/java/org/apache/hadoop/hive/ql/parse/authorization/HiveAuthorizationTaskFactoryImpl.java +++ ql/src/java/org/apache/hadoop/hive/ql/parse/authorization/HiveAuthorizationTaskFactoryImpl.java @@ -138,11 +138,16 @@ public HiveAuthorizationTaskFactoryImpl(HiveConf conf, Hive db) { List privilegeDesc = analyzePrivilegeListDef((ASTNode) ast.getChild(0)); List principalDesc = AuthorizationParseUtils.analyzePrincipalListDef((ASTNode) ast.getChild(1)); PrivilegeObjectDesc hiveObj = null; + boolean grantOption = false; if (ast.getChildCount() > 2) { ASTNode astChild = (ASTNode) ast.getChild(2); hiveObj = analyzePrivilegeObject(astChild, outputs); + + if (null != ast.getFirstChildWithType(HiveParser.TOK_GRANT_OPTION_FOR)) { + grantOption = true; + } } - RevokeDesc revokeDesc = new RevokeDesc(privilegeDesc, principalDesc, hiveObj); + RevokeDesc revokeDesc = new RevokeDesc(privilegeDesc, principalDesc, hiveObj, grantOption); return TaskFactory.get(new DDLWork(inputs, outputs, revokeDesc), conf); } @Override diff --git ql/src/java/org/apache/hadoop/hive/ql/plan/RevokeDesc.java ql/src/java/org/apache/hadoop/hive/ql/plan/RevokeDesc.java index eaef34c..c0b74ff 100644 --- ql/src/java/org/apache/hadoop/hive/ql/plan/RevokeDesc.java +++ ql/src/java/org/apache/hadoop/hive/ql/plan/RevokeDesc.java @@ -31,16 +31,24 @@ private List principals; private PrivilegeObjectDesc privilegeSubjectDesc; - + + private boolean grantOption; + public RevokeDesc(){ } public RevokeDesc(List privileges, List principals, PrivilegeObjectDesc privilegeSubjectDesc) { + this(privileges, principals, privilegeSubjectDesc, false); + } + + public RevokeDesc(List privileges, + List principals, PrivilegeObjectDesc privilegeSubjectDesc, boolean grantOption) { super(); this.privileges = privileges; this.principals = principals; this.privilegeSubjectDesc = privilegeSubjectDesc; + this.grantOption = grantOption; } public List getPrivileges() { @@ -66,5 +74,13 @@ public PrivilegeObjectDesc getPrivilegeSubjectDesc() { public void setPrivilegeSubjectDesc(PrivilegeObjectDesc privilegeSubjectDesc) { this.privilegeSubjectDesc = privilegeSubjectDesc; } + + public boolean isGrantOption() { + return grantOption; + } + + public void setGrantOption(boolean grantOption) { + this.grantOption = grantOption; + } } diff --git ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/sqlstd/SQLStdHiveAccessController.java ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/sqlstd/SQLStdHiveAccessController.java index f2a4004..50aa0bf 100644 --- ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/sqlstd/SQLStdHiveAccessController.java +++ ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/sqlstd/SQLStdHiveAccessController.java @@ -236,7 +236,7 @@ public void revokePrivileges(List hivePrincipals, // So this will revoke privileges that are granted by other users.This is // not SQL compliant behavior. Need to change/add a metastore api // that has desired behavior. - metastoreClient.revoke_privileges(new PrivilegeBag(revokePrivs)); + metastoreClient.revoke_privileges(new PrivilegeBag(revokePrivs), grantOption); } catch (Exception e) { throw new HiveAuthzPluginException("Error revoking privileges", e); } diff --git ql/src/test/queries/clientnegative/authorization_fail_8.q ql/src/test/queries/clientnegative/authorization_fail_8.q new file mode 100644 index 0000000..37213a2 --- /dev/null +++ ql/src/test/queries/clientnegative/authorization_fail_8.q @@ -0,0 +1,21 @@ +set hive.security.authorization.manager=org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactoryForTest; +set hive.security.authenticator.manager=org.apache.hadoop.hive.ql.security.SessionStateConfigUserAuthenticator; + +set user.name=user1; +create table authorization_fail (key int, value string) partitioned by (ds string); +GRANT SELECT ON authorization_fail TO USER user2 WITH GRANT OPTION; + +set user.name=user2; +SHOW GRANT USER user2 ON TABLE authorization_fail; +-- user2 current has grant option, this should work +GRANT SELECT ON authorization_fail TO USER user3; +REVOKE SELECT ON authorization_fail FROM USER user3; + +set user.name=user1; +REVOKE GRANT OPTION FOR SELECT ON authorization_fail FROM USER user2; + +set user.name=user2; +SHOW GRANT USER user2 ON TABLE authorization_fail; +-- Now that grant option has been revoked, granting to other users should fail +GRANT SELECT ON authorization_fail TO USER user3; + diff --git ql/src/test/queries/clientpositive/authorization_revoke_table_priv.q ql/src/test/queries/clientpositive/authorization_revoke_table_priv.q index c8f4bc8..1cd445b 100644 --- ql/src/test/queries/clientpositive/authorization_revoke_table_priv.q +++ ql/src/test/queries/clientpositive/authorization_revoke_table_priv.q @@ -74,6 +74,13 @@ set user.name=user2; SHOW GRANT USER user2 ON TABLE table_priv_rev; set user.name=user1; +-- revoke grant option for select privilege from user2 +REVOKE GRANT OPTION FOR SELECT ON TABLE table_priv_rev FROM USER user2; + +set user.name=user2; +SHOW GRANT USER user2 ON TABLE table_priv_rev; +set user.name=user1; + -- revoke select privilege from user2 REVOKE SELECT ON TABLE table_priv_rev FROM USER user2; diff --git ql/src/test/results/clientnegative/authorization_fail_8.q.out ql/src/test/results/clientnegative/authorization_fail_8.q.out new file mode 100644 index 0000000..10dd71b --- /dev/null +++ ql/src/test/results/clientnegative/authorization_fail_8.q.out @@ -0,0 +1,48 @@ +PREHOOK: query: create table authorization_fail (key int, value string) partitioned by (ds string) +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +POSTHOOK: query: create table authorization_fail (key int, value string) partitioned by (ds string) +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@authorization_fail +PREHOOK: query: GRANT SELECT ON authorization_fail TO USER user2 WITH GRANT OPTION +PREHOOK: type: GRANT_PRIVILEGE +PREHOOK: Output: default@authorization_fail +POSTHOOK: query: GRANT SELECT ON authorization_fail TO USER user2 WITH GRANT OPTION +POSTHOOK: type: GRANT_PRIVILEGE +POSTHOOK: Output: default@authorization_fail +PREHOOK: query: SHOW GRANT USER user2 ON TABLE authorization_fail +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: SHOW GRANT USER user2 ON TABLE authorization_fail +POSTHOOK: type: SHOW_GRANT +default authorization_fail user2 USER SELECT true -1 user1 +PREHOOK: query: -- user2 current has grant option, this should work +GRANT SELECT ON authorization_fail TO USER user3 +PREHOOK: type: GRANT_PRIVILEGE +PREHOOK: Output: default@authorization_fail +POSTHOOK: query: -- user2 current has grant option, this should work +GRANT SELECT ON authorization_fail TO USER user3 +POSTHOOK: type: GRANT_PRIVILEGE +POSTHOOK: Output: default@authorization_fail +PREHOOK: query: REVOKE SELECT ON authorization_fail FROM USER user3 +PREHOOK: type: REVOKE_PRIVILEGE +PREHOOK: Output: default@authorization_fail +POSTHOOK: query: REVOKE SELECT ON authorization_fail FROM USER user3 +POSTHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: Output: default@authorization_fail +PREHOOK: query: REVOKE GRANT OPTION FOR SELECT ON authorization_fail FROM USER user2 +PREHOOK: type: REVOKE_PRIVILEGE +PREHOOK: Output: default@authorization_fail +POSTHOOK: query: REVOKE GRANT OPTION FOR SELECT ON authorization_fail FROM USER user2 +POSTHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: Output: default@authorization_fail +PREHOOK: query: SHOW GRANT USER user2 ON TABLE authorization_fail +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: SHOW GRANT USER user2 ON TABLE authorization_fail +POSTHOOK: type: SHOW_GRANT +default authorization_fail user2 USER SELECT false -1 user1 +PREHOOK: query: -- Now that grant option has been revoked, granting to other users should fail +GRANT SELECT ON authorization_fail TO USER user3 +PREHOOK: type: GRANT_PRIVILEGE +PREHOOK: Output: default@authorization_fail +FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. Permission denied. Principal [name=user2, type=USER] does not have following privileges on Object [type=TABLE_OR_VIEW, name=default.authorization_fail] : [SELECT with grant] diff --git ql/src/test/results/clientpositive/authorization_revoke_table_priv.q.out ql/src/test/results/clientpositive/authorization_revoke_table_priv.q.out index 907c889..2f01568 100644 --- ql/src/test/results/clientpositive/authorization_revoke_table_priv.q.out +++ ql/src/test/results/clientpositive/authorization_revoke_table_priv.q.out @@ -155,6 +155,19 @@ PREHOOK: type: SHOW_GRANT POSTHOOK: query: SHOW GRANT USER user2 ON TABLE table_priv_rev POSTHOOK: type: SHOW_GRANT default table_priv_rev user2 USER SELECT true -1 user1 +PREHOOK: query: -- revoke grant option for select privilege from user2 +REVOKE GRANT OPTION FOR SELECT ON TABLE table_priv_rev FROM USER user2 +PREHOOK: type: REVOKE_PRIVILEGE +PREHOOK: Output: default@table_priv_rev +POSTHOOK: query: -- revoke grant option for select privilege from user2 +REVOKE GRANT OPTION FOR SELECT ON TABLE table_priv_rev FROM USER user2 +POSTHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: Output: default@table_priv_rev +PREHOOK: query: SHOW GRANT USER user2 ON TABLE table_priv_rev +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: SHOW GRANT USER user2 ON TABLE table_priv_rev +POSTHOOK: type: SHOW_GRANT +default table_priv_rev user2 USER SELECT false -1 user1 PREHOOK: query: -- revoke select privilege from user2 REVOKE SELECT ON TABLE table_priv_rev FROM USER user2 PREHOOK: type: REVOKE_PRIVILEGE